Skip to content

Commit

Permalink
feat: add metric data service
Browse files Browse the repository at this point in the history
Signed-off-by: ImMin5 <[email protected]>
  • Loading branch information
ImMin5 committed Dec 10, 2024
1 parent 8aa42dd commit d6d2044
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/spaceone/inventory_v2/interface/grpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

# from .namespace_group import NamespaceGroup
# from .namespace import Namespace
from .metric import Metric
from .metric_data import MetricData
from .metric_example import MetricExample

_all_ = ["app"]

Expand All @@ -19,3 +20,5 @@
# app.add_service(NamespaceGroup)
# app.add_service(Namespace)
app.add_service(Metric)
app.add_service(MetricData)
app.add_service(MetricExample)
2 changes: 1 addition & 1 deletion src/spaceone/inventory_v2/interface/grpc/metric_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from spaceone.core.pygrpc import BaseAPI
from spaceone.api.inventory_v2.v1 import metric_data_pb2, metric_data_pb2_grpc
from spaceone.inventory.service.metric_data_service import MetricDataService
from spaceone.inventory_v2.service.metric_data_service import MetricDataService


class MetricData(BaseAPI, metric_data_pb2_grpc.MetricDataServicer):
Expand Down
2 changes: 1 addition & 1 deletion src/spaceone/inventory_v2/interface/grpc/metric_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from spaceone.core.pygrpc import BaseAPI
from spaceone.api.inventory_v2.v1 import metric_example_pb2, metric_example_pb2_grpc
from spaceone.inventory.service.metric_example_service import MetricExampleService
from spaceone.inventory_v2.service.metric_example_service import MetricExampleService


class MetricExample(BaseAPI, metric_example_pb2_grpc.MetricExampleServicer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from spaceone.core.model.mongo_model import QuerySet
from spaceone.core.manager import BaseManager
from spaceone.inventory.model.metric_example.database import MetricExample
from spaceone.inventory_v2.model.metric_example.database import MetricExample

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/spaceone/inventory_v2/model/metric/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MetricSearchQueryRequest(BaseModel):
is_managed: Union[bool, None] = None
exists_only: Union[bool, None] = None
namespace_id: Union[str, None] = None
workspace_id: Union[str, list, None] = None
workspace_id: Union[list, str, None] = None
domain_id: str


Expand Down

0 comments on commit d6d2044

Please sign in to comment.