Skip to content

Commit

Permalink
Add ResourceMappingServiceApi
Browse files Browse the repository at this point in the history
  • Loading branch information
sidpan1 committed May 17, 2024
1 parent 9730047 commit 51a0367
Show file tree
Hide file tree
Showing 19 changed files with 981 additions and 77 deletions.
73 changes: 11 additions & 62 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ docs/RecommendationTicketAPIRequest.md
docs/RecommendationTicketRequest.md
docs/RecommendationTicketResponse.md
docs/RecommendationsApi.md
docs/ResourceHierarchyMapping.md
docs/ResourceHierarchyMappingRequest.md
docs/ResourceHierarchyMappingResponse.md
docs/ResourceMappingServiceApi.md
docs/ResponseActivatePolicyTemplateResponse.md
docs/ResponseAddTenantPolicyExclusionsResponse.md
docs/ResponseCreateDefaultHierarchyResponse.md
Expand Down Expand Up @@ -165,10 +167,10 @@ docs/ResponseGetTenantProvidersResponse.md
docs/ResponseGetTenantTicketsResponse.md
docs/ResponseGetTenantsResponse.md
docs/ResponseListRecommendationTicketResponse.md
docs/ResponseListResourceHierarchyMapping.md
docs/ResponseNoneType.md
docs/ResponseOverrideTenantAnomalyConfigResponse.md
docs/ResponseOverrideTenantPolicyExclusionsResponse.md
docs/ResponseResourceHierarchyMappingResponse.md
docs/ResponseSetTenantProviderStatusResponse.md
docs/ResponseSetTenantStatusResponse.md
docs/ResponseTenantVerifyCurBucketResponse.md
Expand Down Expand Up @@ -262,6 +264,7 @@ onelens_backend_client/api/policy_template_pack_service_api.py
onelens_backend_client/api/policy_template_service_api.py
onelens_backend_client/api/recommendation_service_api.py
onelens_backend_client/api/recommendations_api.py
onelens_backend_client/api/resource_mapping_service_api.py
onelens_backend_client/api/tenant_anomalies_api.py
onelens_backend_client/api/tenant_anomaly_service_api.py
onelens_backend_client/api/tenant_hierarchy_api.py
Expand Down Expand Up @@ -406,7 +409,8 @@ onelens_backend_client/models/query_order.py
onelens_backend_client/models/recommendation_ticket_api_request.py
onelens_backend_client/models/recommendation_ticket_request.py
onelens_backend_client/models/recommendation_ticket_response.py
onelens_backend_client/models/resource_hierarchy_mapping.py
onelens_backend_client/models/resource_hierarchy_mapping_request.py
onelens_backend_client/models/resource_hierarchy_mapping_response.py
onelens_backend_client/models/response_activate_policy_template_response.py
onelens_backend_client/models/response_add_tenant_policy_exclusions_response.py
onelens_backend_client/models/response_create_default_hierarchy_response.py
Expand Down Expand Up @@ -434,10 +438,10 @@ onelens_backend_client/models/response_get_tenant_providers_response.py
onelens_backend_client/models/response_get_tenant_tickets_response.py
onelens_backend_client/models/response_get_tenants_response.py
onelens_backend_client/models/response_list_recommendation_ticket_response.py
onelens_backend_client/models/response_list_resource_hierarchy_mapping.py
onelens_backend_client/models/response_none_type.py
onelens_backend_client/models/response_override_tenant_anomaly_config_response.py
onelens_backend_client/models/response_override_tenant_policy_exclusions_response.py
onelens_backend_client/models/response_resource_hierarchy_mapping_response.py
onelens_backend_client/models/response_set_tenant_provider_status_response.py
onelens_backend_client/models/response_set_tenant_status_response.py
onelens_backend_client/models/response_tenant_verify_cur_bucket_response.py
Expand Down Expand Up @@ -509,62 +513,7 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_cost_saving.py
test/test_create_default_hierarchy_request.py
test/test_create_hierarchy_root_node_api_request.py
test/test_create_hierarchy_root_node_request.py
test/test_create_hierarchy_root_node_response.py
test/test_create_tenant_tickets_request.py
test/test_data_retriever_api.py
test/test_data_retriever_query.py
test/test_data_retriever_request.py
test/test_data_retriever_response.py
test/test_get_leaf_nodes_request.py
test/test_get_leaf_nodes_response.py
test/test_get_tenant_tickets_request.py
test/test_get_tenant_tickets_response.py
test/test_hierarchy_node_attribution_details.py
test/test_hierarchy_node_entity_dto.py
test/test_hierarchy_node_resource_filters.py
test/test_hierarchy_node_service_api.py
test/test_hierarchy_node_state.py
test/test_key.py
test/test_onelens_models_service_interfaces_tenant_metadata_commons_hierarchy_node_category1.py
test/test_policy_recommendations_api.py
test/test_query_filters.py
test/test_query_order.py
test/test_recommendation_service_api.py
test/test_recommendation_ticket_api_request.py
test/test_recommendation_ticket_request.py
test/test_recommendation_ticket_response.py
test/test_recommendations_api.py
test/test_resource_hierarchy_mapping.py
test/test_response_create_default_hierarchy_response.py
test/test_response_create_hierarchy_root_node_response.py
test/test_response_data_retriever_response.py
test/test_response_get_tenant_tickets_response.py
test/test_response_list_recommendation_ticket_response.py
test/test_response_list_resource_hierarchy_mapping.py
test/test_response_none_type.py
test/test_response_update_tenant_tickets_response.py
test/test_tenant_hierarchy_api.py
test/test_tenant_ticket.py
test/test_tenant_ticket_creation_api_request.py
test/test_tenant_ticket_creation_request.py
test/test_tenant_ticket_service_api.py
test/test_tenant_ticket_update_user_state_api_request.py
test/test_tenant_ticket_updation_api_request.py
test/test_tenant_ticket_updation_request.py
test/test_tenant_tickets_api_request.py
test/test_tenants_resource_catalog_api.py
test/test_tenants_tenant_tickets_api.py
test/test_ticket_category.py
test/test_ticket_details.py
test/test_ticket_system_state.py
test/test_ticket_user_state.py
test/test_time_dimension.py
test/test_time_dimension_compare_date_range_inner.py
test/test_update_tenant_ticket_user_state_request.py
test/test_update_tenant_tickets_request.py
test/test_value.py
test/test_resource_hierarchy_mapping_request.py
test/test_resource_hierarchy_mapping_response.py
test/test_response_resource_hierarchy_mapping_response.py
tox.ini
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Class | Method | Description
*PolicyTemplateServiceApi* | [**update_policy_template**](docs/PolicyTemplateServiceApi.md#update_policy_template) | Updates an existing policy template.
*RecommendationServiceApi* | [**bulk_create**](docs/RecommendationServiceApi.md#bulk_create) | Creates bulk recommendations.
*RecommendationsApi* | [**create_root_node**](docs/RecommendationsApi.md#create_root_node) | Create Root Node
*ResourceMappingServiceApi* | [**create**](docs/ResourceMappingServiceApi.md#create) | create a resource hierarchy mapping
*TenantAnomaliesApi* | [**disable_tenant_anomaly_setting**](docs/TenantAnomaliesApi.md#disable_tenant_anomaly_setting) | Disable Tenant Anomaly Setting
*TenantAnomaliesApi* | [**enable_tenant_anomaly_setting**](docs/TenantAnomaliesApi.md#enable_tenant_anomaly_setting) | Enable Tenant Anomaly Setting
*TenantAnomaliesApi* | [**get_tenant_anomaly_settings**](docs/TenantAnomaliesApi.md#get_tenant_anomaly_settings) | Get Tenant Anomaly Settings
Expand Down Expand Up @@ -312,7 +313,8 @@ Class | Method | Description
- [RecommendationTicketAPIRequest](docs/RecommendationTicketAPIRequest.md)
- [RecommendationTicketRequest](docs/RecommendationTicketRequest.md)
- [RecommendationTicketResponse](docs/RecommendationTicketResponse.md)
- [ResourceHierarchyMapping](docs/ResourceHierarchyMapping.md)
- [ResourceHierarchyMappingRequest](docs/ResourceHierarchyMappingRequest.md)
- [ResourceHierarchyMappingResponse](docs/ResourceHierarchyMappingResponse.md)
- [ResponseActivatePolicyTemplateResponse](docs/ResponseActivatePolicyTemplateResponse.md)
- [ResponseAddTenantPolicyExclusionsResponse](docs/ResponseAddTenantPolicyExclusionsResponse.md)
- [ResponseCreateDefaultHierarchyResponse](docs/ResponseCreateDefaultHierarchyResponse.md)
Expand Down Expand Up @@ -340,10 +342,10 @@ Class | Method | Description
- [ResponseGetTenantTicketsResponse](docs/ResponseGetTenantTicketsResponse.md)
- [ResponseGetTenantsResponse](docs/ResponseGetTenantsResponse.md)
- [ResponseListRecommendationTicketResponse](docs/ResponseListRecommendationTicketResponse.md)
- [ResponseListResourceHierarchyMapping](docs/ResponseListResourceHierarchyMapping.md)
- [ResponseNoneType](docs/ResponseNoneType.md)
- [ResponseOverrideTenantAnomalyConfigResponse](docs/ResponseOverrideTenantAnomalyConfigResponse.md)
- [ResponseOverrideTenantPolicyExclusionsResponse](docs/ResponseOverrideTenantPolicyExclusionsResponse.md)
- [ResponseResourceHierarchyMappingResponse](docs/ResponseResourceHierarchyMappingResponse.md)
- [ResponseSetTenantProviderStatusResponse](docs/ResponseSetTenantProviderStatusResponse.md)
- [ResponseSetTenantStatusResponse](docs/ResponseSetTenantStatusResponse.md)
- [ResponseTenantVerifyCurBucketResponse](docs/ResponseTenantVerifyCurBucketResponse.md)
Expand Down
30 changes: 30 additions & 0 deletions docs/ResourceHierarchyMappingRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ResourceHierarchyMappingRequest

dto for resource hierarchy mapping request

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tenant_id** | **str** | Tenant ID |

## Example

```python
from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest

# TODO update the JSON string below
json = "{}"
# create an instance of ResourceHierarchyMappingRequest from a JSON string
resource_hierarchy_mapping_request_instance = ResourceHierarchyMappingRequest.from_json(json)
# print the JSON string representation of the object
print(ResourceHierarchyMappingRequest.to_json())

# convert the object into a dict
resource_hierarchy_mapping_request_dict = resource_hierarchy_mapping_request_instance.to_dict()
# create an instance of ResourceHierarchyMappingRequest from a dict
resource_hierarchy_mapping_request_form_dict = resource_hierarchy_mapping_request.from_dict(resource_hierarchy_mapping_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


31 changes: 31 additions & 0 deletions docs/ResourceHierarchyMappingResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# ResourceHierarchyMappingResponse

dto for resource hierarchy mapping

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**hierarchy_node_id** | **str** | List of hierarchy node ids for the resource mapping |
**resource_id** | **str** | List of resource ids for the resource mapping |

## Example

```python
from onelens_backend_client.models.resource_hierarchy_mapping_response import ResourceHierarchyMappingResponse

# TODO update the JSON string below
json = "{}"
# create an instance of ResourceHierarchyMappingResponse from a JSON string
resource_hierarchy_mapping_response_instance = ResourceHierarchyMappingResponse.from_json(json)
# print the JSON string representation of the object
print(ResourceHierarchyMappingResponse.to_json())

# convert the object into a dict
resource_hierarchy_mapping_response_dict = resource_hierarchy_mapping_response_instance.to_dict()
# create an instance of ResourceHierarchyMappingResponse from a dict
resource_hierarchy_mapping_response_form_dict = resource_hierarchy_mapping_response.from_dict(resource_hierarchy_mapping_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


76 changes: 76 additions & 0 deletions docs/ResourceMappingServiceApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# ResourceMappingServiceApi

All URIs are relative to *http://localhost*

Method | Description
------------- | -------------
[**create**](ResourceMappingServiceApi.md#create) | create a resource hierarchy mapping


# **create**
> object create(resource_hierarchy_mapping_request)
create a resource hierarchy mapping

### Example


```python
import onelens_backend_client
from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest
from onelens_backend_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)


# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.ResourceMappingServiceApi(api_client)
resource_hierarchy_mapping_request = onelens_backend_client.ResourceHierarchyMappingRequest() # ResourceHierarchyMappingRequest |

try:
# create a resource hierarchy mapping
api_response = api_instance.create(resource_hierarchy_mapping_request)
print("The response of ResourceMappingServiceApi->create:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ResourceMappingServiceApi->create: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**resource_hierarchy_mapping_request** | [**ResourceHierarchyMappingRequest**](ResourceHierarchyMappingRequest.md)| |

### Return type

**object**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

30 changes: 30 additions & 0 deletions docs/ResponseResourceHierarchyMappingResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ResponseResourceHierarchyMappingResponse


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**ResourceHierarchyMappingResponse**](ResourceHierarchyMappingResponse.md) | |
**message** | **str** | | [optional]

## Example

```python
from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse

# TODO update the JSON string below
json = "{}"
# create an instance of ResponseResourceHierarchyMappingResponse from a JSON string
response_resource_hierarchy_mapping_response_instance = ResponseResourceHierarchyMappingResponse.from_json(json)
# print the JSON string representation of the object
print(ResponseResourceHierarchyMappingResponse.to_json())

# convert the object into a dict
response_resource_hierarchy_mapping_response_dict = response_resource_hierarchy_mapping_response_instance.to_dict()
# create an instance of ResponseResourceHierarchyMappingResponse from a dict
response_resource_hierarchy_mapping_response_form_dict = response_resource_hierarchy_mapping_response.from_dict(response_resource_hierarchy_mapping_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


6 changes: 3 additions & 3 deletions docs/TenantsResourceCatalogApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Method | Description


# **create_root_node**
> ResponseListResourceHierarchyMapping create_root_node(tenant_id)
> ResponseResourceHierarchyMappingResponse create_root_node(tenant_id)
Create Root Node

Expand All @@ -19,7 +19,7 @@ An API endpoint to create resource and hierarchy mapping

```python
import onelens_backend_client
from onelens_backend_client.models.response_list_resource_hierarchy_mapping import ResponseListResourceHierarchyMapping
from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint

Expand Down Expand Up @@ -56,7 +56,7 @@ Name | Type | Description | Notes

### Return type

[**ResponseListResourceHierarchyMapping**](ResponseListResourceHierarchyMapping.md)
[**ResponseResourceHierarchyMappingResponse**](ResponseResourceHierarchyMappingResponse.md)

### Authorization

Expand Down
6 changes: 4 additions & 2 deletions onelens_backend_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from onelens_backend_client.api.policy_template_service_api import PolicyTemplateServiceApi
from onelens_backend_client.api.recommendation_service_api import RecommendationServiceApi
from onelens_backend_client.api.recommendations_api import RecommendationsApi
from onelens_backend_client.api.resource_mapping_service_api import ResourceMappingServiceApi
from onelens_backend_client.api.tenant_anomalies_api import TenantAnomaliesApi
from onelens_backend_client.api.tenant_anomaly_service_api import TenantAnomalyServiceApi
from onelens_backend_client.api.tenant_hierarchy_api import TenantHierarchyApi
Expand Down Expand Up @@ -180,7 +181,8 @@
from onelens_backend_client.models.recommendation_ticket_api_request import RecommendationTicketAPIRequest
from onelens_backend_client.models.recommendation_ticket_request import RecommendationTicketRequest
from onelens_backend_client.models.recommendation_ticket_response import RecommendationTicketResponse
from onelens_backend_client.models.resource_hierarchy_mapping import ResourceHierarchyMapping
from onelens_backend_client.models.resource_hierarchy_mapping_request import ResourceHierarchyMappingRequest
from onelens_backend_client.models.resource_hierarchy_mapping_response import ResourceHierarchyMappingResponse
from onelens_backend_client.models.response_activate_policy_template_response import ResponseActivatePolicyTemplateResponse
from onelens_backend_client.models.response_add_tenant_policy_exclusions_response import ResponseAddTenantPolicyExclusionsResponse
from onelens_backend_client.models.response_create_default_hierarchy_response import ResponseCreateDefaultHierarchyResponse
Expand Down Expand Up @@ -208,10 +210,10 @@
from onelens_backend_client.models.response_get_tenant_tickets_response import ResponseGetTenantTicketsResponse
from onelens_backend_client.models.response_get_tenants_response import ResponseGetTenantsResponse
from onelens_backend_client.models.response_list_recommendation_ticket_response import ResponseListRecommendationTicketResponse
from onelens_backend_client.models.response_list_resource_hierarchy_mapping import ResponseListResourceHierarchyMapping
from onelens_backend_client.models.response_none_type import ResponseNoneType
from onelens_backend_client.models.response_override_tenant_anomaly_config_response import ResponseOverrideTenantAnomalyConfigResponse
from onelens_backend_client.models.response_override_tenant_policy_exclusions_response import ResponseOverrideTenantPolicyExclusionsResponse
from onelens_backend_client.models.response_resource_hierarchy_mapping_response import ResponseResourceHierarchyMappingResponse
from onelens_backend_client.models.response_set_tenant_provider_status_response import ResponseSetTenantProviderStatusResponse
from onelens_backend_client.models.response_set_tenant_status_response import ResponseSetTenantStatusResponse
from onelens_backend_client.models.response_tenant_verify_cur_bucket_response import ResponseTenantVerifyCurBucketResponse
Expand Down
1 change: 1 addition & 0 deletions onelens_backend_client/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from onelens_backend_client.api.policy_template_service_api import PolicyTemplateServiceApi
from onelens_backend_client.api.recommendation_service_api import RecommendationServiceApi
from onelens_backend_client.api.recommendations_api import RecommendationsApi
from onelens_backend_client.api.resource_mapping_service_api import ResourceMappingServiceApi
from onelens_backend_client.api.tenant_anomalies_api import TenantAnomaliesApi
from onelens_backend_client.api.tenant_anomaly_service_api import TenantAnomalyServiceApi
from onelens_backend_client.api.tenant_hierarchy_api import TenantHierarchyApi
Expand Down
Loading

0 comments on commit 51a0367

Please sign in to comment.