-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
866 additions
and
681 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
from spaceone.core.pygrpc.server import GRPCServer | ||
from spaceone.config.interface.grpc.user_config import UserConfig | ||
from spaceone.config.interface.grpc.domain_config import DomainConfig | ||
from spaceone.config.interface.grpc.shared_config import SharedConfig | ||
from spaceone.config.interface.grpc.public_config import PublicConfig | ||
from spaceone.config.interface.grpc.user_config import UserConfig | ||
|
||
_all_ = ["app"] | ||
|
||
app = GRPCServer() | ||
app.add_service(DomainConfig) | ||
app.add_service(UserConfig) | ||
app.add_service(DomainConfig) | ||
app.add_service(SharedConfig) | ||
app.add_service(PublicConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from spaceone.api.config.v1 import shared_config_pb2, shared_config_pb2_grpc | ||
from spaceone.core.pygrpc import BaseAPI | ||
|
||
from spaceone.config.service.shared_config_service import SharedConfigService | ||
|
||
|
||
class SharedConfig(BaseAPI, shared_config_pb2_grpc.SharedConfigServicer): | ||
pb2 = shared_config_pb2 | ||
pb2_grpc = shared_config_pb2_grpc | ||
|
||
def create(self, request, context): | ||
params, metadata = self.parse_request(request, context) | ||
shared_config_svc = SharedConfigService(metadata) | ||
response: dict = shared_config_svc.create(params) | ||
return self.dict_to_message(response) | ||
|
||
def update(self, request, context): | ||
params, metadata = self.parse_request(request, context) | ||
shared_config_svc = SharedConfigService(metadata) | ||
response: dict = shared_config_svc.update(params) | ||
return self.dict_to_message(response) | ||
|
||
def delete(self, request, context): | ||
params, metadata = self.parse_request(request, context) | ||
shared_config_svc = SharedConfigService(metadata) | ||
shared_config_svc.delete(params) | ||
return self.empty() | ||
|
||
def get(self, request, context): | ||
params, metadata = self.parse_request(request, context) | ||
shared_config_svc = SharedConfigService(metadata) | ||
response: dict = shared_config_svc.get(params) | ||
return self.dict_to_message(response) | ||
|
||
def list(self, request, context): | ||
params, metadata = self.parse_request(request, context) | ||
shared_config_svc = SharedConfigService(metadata) | ||
response: dict = shared_config_svc.list(params) | ||
return self.dict_to_message(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.