Skip to content

Commit

Permalink
feat: add SpaceConnector backend config
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMin5 committed Dec 20, 2023
1 parent dfaab4f commit dca1d7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/spaceone/cost_analysis/conf/global_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

CONNECTORS = {
"SpaceConnector": {
"backend": "spaceone.core.connector.space_connector.SpaceConnector",
"backend": "spaceone.core.connector.space_connector:SpaceConnector",
"endpoints": {
"identity": "grpc://identity:50051",
"plugin": "grpc://plugin:50051",
Expand Down
11 changes: 5 additions & 6 deletions src/spaceone/cost_analysis/manager/notification_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@


class NotificationManager(BaseManager):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.notification_connector: SpaceConnector = self.locator.get_connector('SpaceConnector',
service='notification',
token=config.get_global('TOKEN'))
self.notification_connector: SpaceConnector = self.locator.get_connector(
"SpaceConnector", service="notification", token=config.get_global("TOKEN")
)

def create_notification(self, message):
_LOGGER.debug(f'Notify message: {message}')
return self.notification_connector.dispatch('Notification.create', message)
_LOGGER.debug(f"Notify message: {message}")
return self.notification_connector.dispatch("Notification.create", message)

0 comments on commit dca1d7a

Please sign in to comment.