Skip to content

Commit

Permalink
Merge pull request #119 from ImMin5/master
Browse files Browse the repository at this point in the history
feat: add SpaceConnector backend config
  • Loading branch information
ImMin5 authored Dec 20, 2023
2 parents e01bb82 + dca1d7a commit 1e35f94
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 1e35f94

Please sign in to comment.