Skip to content

Commit

Permalink
Add alias and policy template pack service
Browse files Browse the repository at this point in the history
  • Loading branch information
sidpan1 committed Mar 20, 2024
1 parent 222ac60 commit 0b30f6b
Show file tree
Hide file tree
Showing 21 changed files with 1,320 additions and 27 deletions.
14 changes: 6 additions & 8 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ docs/GetAllUsersRequest.md
docs/GetAllUsersResponse.md
docs/GetPolicyTemplateByIDRequest.md
docs/GetPolicyTemplateByIDResponse.md
docs/GetPolicyTemplatePackByIdRequest.md
docs/GetPolicyTemplatePackByIdResponse.md
docs/GetPolicyTemplatePacksRequest.md
docs/GetPolicyTemplatePacksResponse.md
Expand All @@ -63,7 +64,6 @@ docs/PaginationParams.md
docs/ParentId.md
docs/ParentId1.md
docs/ParentIds.md
docs/PoliciesPolicyTemplatePacksApi.md
docs/PolicyCategory.md
docs/PolicyExecutionType.md
docs/PolicyTemplate.md
Expand All @@ -72,17 +72,15 @@ docs/PolicyTemplateDetailsRuleType.md
docs/PolicyTemplateFilters.md
docs/PolicyTemplatePack.md
docs/PolicyTemplatePackDetails.md
docs/PolicyTemplatePackServiceApi.md
docs/PolicyTemplatePackState.md
docs/PolicyTemplateServiceApi.md
docs/PolicyTemplateState.md
docs/Provider.md
docs/ProviderConfig.md
docs/ResponseCreatePolicyTemplatePackResponse.md
docs/ResponseCreateTenantUserResponse.md
docs/ResponseCreateUserTenantMappingResponse.md
docs/ResponseDisableTenantProviderResponse.md
docs/ResponseGetPolicyTemplatePackByIdResponse.md
docs/ResponseGetPolicyTemplatePacksResponse.md
docs/ResponseGetTenantProviderByIDResponse.md
docs/ResponseGetTenantProvidersResponse.md
docs/ResponseTenantVerifyResponse.md
Expand Down Expand Up @@ -135,7 +133,7 @@ git_push.sh
onelens_backend_client/__init__.py
onelens_backend_client/api/__init__.py
onelens_backend_client/api/default_api.py
onelens_backend_client/api/policies_policy_template_packs_api.py
onelens_backend_client/api/policy_template_pack_service_api.py
onelens_backend_client/api/policy_template_service_api.py
onelens_backend_client/api/tenant_service_api.py
onelens_backend_client/api/tenant_users_api.py
Expand Down Expand Up @@ -182,6 +180,7 @@ onelens_backend_client/models/get_all_users_request.py
onelens_backend_client/models/get_all_users_response.py
onelens_backend_client/models/get_policy_template_by_id_request.py
onelens_backend_client/models/get_policy_template_by_id_response.py
onelens_backend_client/models/get_policy_template_pack_by_id_request.py
onelens_backend_client/models/get_policy_template_pack_by_id_response.py
onelens_backend_client/models/get_policy_template_packs_request.py
onelens_backend_client/models/get_policy_template_packs_response.py
Expand Down Expand Up @@ -219,12 +218,9 @@ onelens_backend_client/models/policy_template_pack_state.py
onelens_backend_client/models/policy_template_state.py
onelens_backend_client/models/provider.py
onelens_backend_client/models/provider_config.py
onelens_backend_client/models/response_create_policy_template_pack_response.py
onelens_backend_client/models/response_create_tenant_user_response.py
onelens_backend_client/models/response_create_user_tenant_mapping_response.py
onelens_backend_client/models/response_disable_tenant_provider_response.py
onelens_backend_client/models/response_get_policy_template_pack_by_id_response.py
onelens_backend_client/models/response_get_policy_template_packs_response.py
onelens_backend_client/models/response_get_tenant_provider_by_id_response.py
onelens_backend_client/models/response_get_tenant_providers_response.py
onelens_backend_client/models/response_tenant_verify_response.py
Expand Down Expand Up @@ -275,4 +271,6 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_get_policy_template_pack_by_id_request.py
test/test_policy_template_pack_service_api.py
tox.ini
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ All URIs are relative to *http://localhost*
Class | Method | Description
------------ | ------------- | -------------
*DefaultApi* | [**root**](docs/DefaultApi.md#root) | Root
*PoliciesPolicyTemplatePacksApi* | [**create_policy_template_pack**](docs/PoliciesPolicyTemplatePacksApi.md#create_policy_template_pack) | Create Policy Template Pack
*PoliciesPolicyTemplatePacksApi* | [**get_policy_template_pack**](docs/PoliciesPolicyTemplatePacksApi.md#get_policy_template_pack) | Get Policy Template Pack
*PoliciesPolicyTemplatePacksApi* | [**get_policy_template_packs**](docs/PoliciesPolicyTemplatePacksApi.md#get_policy_template_packs) | Get Policy Template Packs
*PolicyTemplatePackServiceApi* | [**create_policy_template_pack**](docs/PolicyTemplatePackServiceApi.md#create_policy_template_pack) | Create a new policy template pack.
*PolicyTemplatePackServiceApi* | [**get_policy_template_pack_by_id**](docs/PolicyTemplatePackServiceApi.md#get_policy_template_pack_by_id) | Get a policy template pack by id.
*PolicyTemplatePackServiceApi* | [**get_policy_template_packs**](docs/PolicyTemplatePackServiceApi.md#get_policy_template_packs) | Get all policy template packs.
*PolicyTemplateServiceApi* | [**activate_policy_template**](docs/PolicyTemplateServiceApi.md#activate_policy_template) | Deprecate a policy template.
*PolicyTemplateServiceApi* | [**create_policy_template**](docs/PolicyTemplateServiceApi.md#create_policy_template) | Creates a new policy template.
*PolicyTemplateServiceApi* | [**deactivate_policy_template**](docs/PolicyTemplateServiceApi.md#deactivate_policy_template) | Deprecate a policy template.
Expand Down Expand Up @@ -151,6 +151,7 @@ Class | Method | Description
- [GetAllUsersResponse](docs/GetAllUsersResponse.md)
- [GetPolicyTemplateByIDRequest](docs/GetPolicyTemplateByIDRequest.md)
- [GetPolicyTemplateByIDResponse](docs/GetPolicyTemplateByIDResponse.md)
- [GetPolicyTemplatePackByIdRequest](docs/GetPolicyTemplatePackByIdRequest.md)
- [GetPolicyTemplatePackByIdResponse](docs/GetPolicyTemplatePackByIdResponse.md)
- [GetPolicyTemplatePacksRequest](docs/GetPolicyTemplatePacksRequest.md)
- [GetPolicyTemplatePacksResponse](docs/GetPolicyTemplatePacksResponse.md)
Expand Down Expand Up @@ -188,12 +189,9 @@ Class | Method | Description
- [PolicyTemplateState](docs/PolicyTemplateState.md)
- [Provider](docs/Provider.md)
- [ProviderConfig](docs/ProviderConfig.md)
- [ResponseCreatePolicyTemplatePackResponse](docs/ResponseCreatePolicyTemplatePackResponse.md)
- [ResponseCreateTenantUserResponse](docs/ResponseCreateTenantUserResponse.md)
- [ResponseCreateUserTenantMappingResponse](docs/ResponseCreateUserTenantMappingResponse.md)
- [ResponseDisableTenantProviderResponse](docs/ResponseDisableTenantProviderResponse.md)
- [ResponseGetPolicyTemplatePackByIdResponse](docs/ResponseGetPolicyTemplatePackByIdResponse.md)
- [ResponseGetPolicyTemplatePacksResponse](docs/ResponseGetPolicyTemplatePacksResponse.md)
- [ResponseGetTenantProviderByIDResponse](docs/ResponseGetTenantProviderByIDResponse.md)
- [ResponseGetTenantProvidersResponse](docs/ResponseGetTenantProvidersResponse.md)
- [ResponseTenantVerifyResponse](docs/ResponseTenantVerifyResponse.md)
Expand Down
1 change: 1 addition & 0 deletions docs/CreatePolicyTemplateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**parent_ptp_id** | **str** | The id of the parent policy template pack. |
**title** | **str** | The title of the policy template. |
**alias** | **str** | The alias of the policy template. |
**description** | **str** | The description of the policy template. | [optional]
**services** | [**List[CreatePolicyTemplateRequestServicesInner]**](CreatePolicyTemplateRequestServicesInner.md) | The list of services associated the policy template. |
**execution_type** | [**PolicyExecutionType**](PolicyExecutionType.md) | The execution type of the policy template. |
Expand Down
1 change: 1 addition & 0 deletions docs/CreatePolicyTemplateResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**parent_ptp_id** | **str** | The id of the parent policy template pack. |
**title** | **str** | The title of the policy template. |
**alias** | **str** | The alias of the policy template. |
**description** | **str** | The description of the policy template. | [optional]
**services** | [**List[CreatePolicyTemplateRequestServicesInner]**](CreatePolicyTemplateRequestServicesInner.md) | The list of services associated the policy template. |
**execution_type** | [**PolicyExecutionType**](PolicyExecutionType.md) | The execution type of the policy template. |
Expand Down
1 change: 1 addition & 0 deletions docs/GetPolicyTemplateByIDResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**parent_ptp_id** | **str** | The id of the parent policy template pack. |
**title** | **str** | The title of the policy template. |
**alias** | **str** | The alias of the policy template. |
**description** | **str** | The description of the policy template. | [optional]
**services** | [**List[CreatePolicyTemplateRequestServicesInner]**](CreatePolicyTemplateRequestServicesInner.md) | The list of services associated the policy template. |
**execution_type** | [**PolicyExecutionType**](PolicyExecutionType.md) | The execution type of the policy template. |
Expand Down
29 changes: 29 additions & 0 deletions docs/GetPolicyTemplatePackByIdRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# GetPolicyTemplatePackByIdRequest


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | The unique identifier of the policy template pack |

## Example

```python
from onelens_backend_client.models.get_policy_template_pack_by_id_request import GetPolicyTemplatePackByIdRequest

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

# convert the object into a dict
get_policy_template_pack_by_id_request_dict = get_policy_template_pack_by_id_request_instance.to_dict()
# create an instance of GetPolicyTemplatePackByIdRequest from a dict
get_policy_template_pack_by_id_request_form_dict = get_policy_template_pack_by_id_request.from_dict(get_policy_template_pack_by_id_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)


1 change: 1 addition & 0 deletions docs/PolicyTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**parent_ptp_id** | **str** | The id of the parent policy template pack. |
**title** | **str** | The title of the policy template. |
**alias** | **str** | The alias of the policy template. |
**description** | **str** | The description of the policy template. | [optional]
**services** | [**List[CreatePolicyTemplateRequestServicesInner]**](CreatePolicyTemplateRequestServicesInner.md) | The list of services associated the policy template. |
**execution_type** | [**PolicyExecutionType**](PolicyExecutionType.md) | The execution type of the policy template. |
Expand Down
215 changes: 215 additions & 0 deletions docs/PolicyTemplatePackServiceApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
# PolicyTemplatePackServiceApi

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

Method | Description
------------- | -------------
[**create_policy_template_pack**](PolicyTemplatePackServiceApi.md#create_policy_template_pack) | Create a new policy template pack.
[**get_policy_template_pack_by_id**](PolicyTemplatePackServiceApi.md#get_policy_template_pack_by_id) | Get a policy template pack by id.
[**get_policy_template_packs**](PolicyTemplatePackServiceApi.md#get_policy_template_packs) | Get all policy template packs.


# **create_policy_template_pack**
> CreatePolicyTemplatePackResponse create_policy_template_pack(create_policy_template_pack_request)
Create a new policy template pack.

### Example


```python
import onelens_backend_client
from onelens_backend_client.models.create_policy_template_pack_request import CreatePolicyTemplatePackRequest
from onelens_backend_client.models.create_policy_template_pack_response import CreatePolicyTemplatePackResponse
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.PolicyTemplatePackServiceApi(api_client)
create_policy_template_pack_request = onelens_backend_client.CreatePolicyTemplatePackRequest() # CreatePolicyTemplatePackRequest |

try:
# Create a new policy template pack.
api_response = api_instance.create_policy_template_pack(create_policy_template_pack_request)
print("The response of PolicyTemplatePackServiceApi->create_policy_template_pack:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PolicyTemplatePackServiceApi->create_policy_template_pack: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**create_policy_template_pack_request** | [**CreatePolicyTemplatePackRequest**](CreatePolicyTemplatePackRequest.md)| |

### Return type

[**CreatePolicyTemplatePackResponse**](CreatePolicyTemplatePackResponse.md)

### 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)

# **get_policy_template_pack_by_id**
> GetPolicyTemplatePackByIdResponse get_policy_template_pack_by_id(get_policy_template_pack_by_id_request)
Get a policy template pack by id.

### Example


```python
import onelens_backend_client
from onelens_backend_client.models.get_policy_template_pack_by_id_request import GetPolicyTemplatePackByIdRequest
from onelens_backend_client.models.get_policy_template_pack_by_id_response import GetPolicyTemplatePackByIdResponse
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.PolicyTemplatePackServiceApi(api_client)
get_policy_template_pack_by_id_request = onelens_backend_client.GetPolicyTemplatePackByIdRequest() # GetPolicyTemplatePackByIdRequest |

try:
# Get a policy template pack by id.
api_response = api_instance.get_policy_template_pack_by_id(get_policy_template_pack_by_id_request)
print("The response of PolicyTemplatePackServiceApi->get_policy_template_pack_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PolicyTemplatePackServiceApi->get_policy_template_pack_by_id: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**get_policy_template_pack_by_id_request** | [**GetPolicyTemplatePackByIdRequest**](GetPolicyTemplatePackByIdRequest.md)| |

### Return type

[**GetPolicyTemplatePackByIdResponse**](GetPolicyTemplatePackByIdResponse.md)

### 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)

# **get_policy_template_packs**
> GetPolicyTemplatePacksResponse get_policy_template_packs(get_policy_template_packs_request)
Get all policy template packs.

### Example


```python
import onelens_backend_client
from onelens_backend_client.models.get_policy_template_packs_request import GetPolicyTemplatePacksRequest
from onelens_backend_client.models.get_policy_template_packs_response import GetPolicyTemplatePacksResponse
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.PolicyTemplatePackServiceApi(api_client)
get_policy_template_packs_request = onelens_backend_client.GetPolicyTemplatePacksRequest() # GetPolicyTemplatePacksRequest |

try:
# Get all policy template packs.
api_response = api_instance.get_policy_template_packs(get_policy_template_packs_request)
print("The response of PolicyTemplatePackServiceApi->get_policy_template_packs:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PolicyTemplatePackServiceApi->get_policy_template_packs: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**get_policy_template_packs_request** | [**GetPolicyTemplatePacksRequest**](GetPolicyTemplatePacksRequest.md)| |

### Return type

[**GetPolicyTemplatePacksResponse**](GetPolicyTemplatePacksResponse.md)

### 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)

1 change: 1 addition & 0 deletions docs/UpdatePolicyTemplateResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**parent_ptp_id** | **str** | The id of the parent policy template pack. |
**title** | **str** | The title of the policy template. |
**alias** | **str** | The alias of the policy template. |
**description** | **str** | The description of the policy template. | [optional]
**services** | [**List[CreatePolicyTemplateRequestServicesInner]**](CreatePolicyTemplateRequestServicesInner.md) | The list of services associated the policy template. |
**execution_type** | [**PolicyExecutionType**](PolicyExecutionType.md) | The execution type of the policy template. |
Expand Down
Loading

0 comments on commit 0b30f6b

Please sign in to comment.