From 251ab1fc9c76f8cbeef1f9d8e6fde0dd2dfec5f6 Mon Sep 17 00:00:00 2001 From: Sidhant Panda Date: Fri, 24 May 2024 12:18:12 +0530 Subject: [PATCH] Add resource catalog --- .openapi-generator/FILES | 4 ---- docs/ResourceCatalogResponse.md | 1 + docs/ServiceCatalog.md | 1 + onelens_backend_client/models/resource_catalog_response.py | 4 +++- onelens_backend_client/models/service_catalog.py | 4 +++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3bcfb6c7..d7eadcc2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -593,8 +593,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_policy_recommendation_params.py -test/test_policy_template_recommendation_details_input.py -test/test_policy_template_recommendation_details_output.py -test/test_policy_template_recommendation_units.py tox.ini diff --git a/docs/ResourceCatalogResponse.md b/docs/ResourceCatalogResponse.md index c33180cf..ca66e794 100644 --- a/docs/ResourceCatalogResponse.md +++ b/docs/ResourceCatalogResponse.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **crn** | **str** | Cloud resource identifier | **provider** | **str** | Resource provider | **status** | **str** | Resource status | +**tags** | **object** | Resource tags. | **additional_info** | **object** | Additional info of the resource. | **run_id** | **str** | The run id. | **last_updated_at** | **datetime** | The last updated at. | diff --git a/docs/ServiceCatalog.md b/docs/ServiceCatalog.md index ea8417b5..8ed80119 100644 --- a/docs/ServiceCatalog.md +++ b/docs/ServiceCatalog.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **name** | **str** | | +**code** | **str** | | **product_code** | **str** | | **display_name** | **str** | | **description** | **str** | | diff --git a/onelens_backend_client/models/resource_catalog_response.py b/onelens_backend_client/models/resource_catalog_response.py index 7edd30e6..73b797f1 100644 --- a/onelens_backend_client/models/resource_catalog_response.py +++ b/onelens_backend_client/models/resource_catalog_response.py @@ -37,10 +37,11 @@ class ResourceCatalogResponse(BaseModel): crn: StrictStr = Field(description="Cloud resource identifier") provider: StrictStr = Field(description="Resource provider") status: StrictStr = Field(description="Resource status") + tags: Dict[str, Any] = Field(description="Resource tags.") additional_info: Dict[str, Any] = Field(description="Additional info of the resource.") run_id: StrictStr = Field(description="The run id.") last_updated_at: datetime = Field(description="The last updated at.") - __properties: ClassVar[List[str]] = ["ol_id", "cloud_id", "region", "service", "service_display_name", "resource_type", "resource_url_template", "crn", "provider", "status", "additional_info", "run_id", "last_updated_at"] + __properties: ClassVar[List[str]] = ["ol_id", "cloud_id", "region", "service", "service_display_name", "resource_type", "resource_url_template", "crn", "provider", "status", "tags", "additional_info", "run_id", "last_updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -103,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "crn": obj.get("crn"), "provider": obj.get("provider"), "status": obj.get("status"), + "tags": obj.get("tags"), "additional_info": obj.get("additional_info"), "run_id": obj.get("run_id"), "last_updated_at": obj.get("last_updated_at") diff --git a/onelens_backend_client/models/service_catalog.py b/onelens_backend_client/models/service_catalog.py index e68ab804..2c8033a6 100644 --- a/onelens_backend_client/models/service_catalog.py +++ b/onelens_backend_client/models/service_catalog.py @@ -30,12 +30,13 @@ class ServiceCatalog(BaseModel): """ # noqa: E501 id: StrictStr name: StrictStr + code: StrictStr product_code: StrictStr display_name: StrictStr description: StrictStr resource_types: List[ResourceType] features: Features - __properties: ClassVar[List[str]] = ["id", "name", "product_code", "display_name", "description", "resource_types", "features"] + __properties: ClassVar[List[str]] = ["id", "name", "code", "product_code", "display_name", "description", "resource_types", "features"] model_config = ConfigDict( populate_by_name=True, @@ -100,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), + "code": obj.get("code"), "product_code": obj.get("product_code"), "display_name": obj.get("display_name"), "description": obj.get("description"),