Skip to content

Commit

Permalink
fix: temporary remove send metadat to noti plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMin5 committed Dec 22, 2023
1 parent 8f39515 commit 850606c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from google.protobuf.json_format import MessageToDict

from spaceone.core.connector import BaseConnector
from spaceone.core.connector.space_connector import SpaceConnector
from spaceone.core import pygrpc
from spaceone.core.utils import parse_endpoint

Expand Down Expand Up @@ -30,16 +31,16 @@ def init(self, options):
response = self.client.Protocol.init(
{
"options": options,
},
metadata=self.transaction.meta,
}
# metadata=self.transaction.meta,
)

return self._change_message(response)

def verify(self, options, secret_data):
params = {"options": options, "secret_data": secret_data}

self.client.Protocol.verify(params, metadata=self.transaction.meta)
self.client.Protocol.verify(params) # todo: add metadata

def dispatch_notification(
self, secret_data, channel_data, notification_type, message, options={}
Expand Down
5 changes: 2 additions & 3 deletions src/spaceone/notification/service/protocol_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ def _create(self, params: dict) -> Protocol:
"name": utils.generate_id("secret-noti-proto", 4),
"data": plugin_info["secret_data"],
"resource_group": "WORKSPACE",
"schema_id": plugin_info["schema_id"],
"schema_id": plugin_info["schema"], # todo change to schema_id
}

protocol_secret = secret_mgr.create_secret(secret_params)
request_plugin.update(
{
"secret_id": protocol_secret["secret_id"],
"schema_id": plugin_info["schema_id"],
"schema_id": plugin_info["schema"], # todo change to schema_id
}
)

Expand Down

0 comments on commit 850606c

Please sign in to comment.