Skip to content

Commit

Permalink
Add resource catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
sidpan1 committed May 24, 2024
1 parent dd260aa commit 251ab1f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions docs/ResourceCatalogResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
1 change: 1 addition & 0 deletions docs/ServiceCatalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**name** | **str** | |
**code** | **str** | |
**product_code** | **str** | |
**display_name** | **str** | |
**description** | **str** | |
Expand Down
4 changes: 3 additions & 1 deletion onelens_backend_client/models/resource_catalog_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 3 additions & 1 deletion onelens_backend_client/models/service_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit 251ab1f

Please sign in to comment.