diff --git a/formatter.nix b/formatter.nix
index 5d7a76b..f9d05ce 100644
--- a/formatter.nix
+++ b/formatter.nix
@@ -18,6 +18,8 @@
treefmt.settings.formatter.prettier.excludes = [
"secrets.yaml"
"key.json"
+ "keyfile.json"
+ "**/pkgs/clan-cli/tests/openapi_client/**"
];
treefmt.programs.mypy.enable = true;
diff --git a/pkgs/clan-cli/clan_cli/config.py b/pkgs/clan-cli/clan_cli/config.py
index 1891573..f50cd8b 100644
--- a/pkgs/clan-cli/clan_cli/config.py
+++ b/pkgs/clan-cli/clan_cli/config.py
@@ -1,8 +1,10 @@
host = "127.0.0.1"
port_dlg = 7000
port_ap = 7500
-port_client_base = 8000
+_port_client_base = 8000
+c1_port = _port_client_base + 1
+c2_port = _port_client_base + 2
dlg_url = f"http://{host}:{port_dlg}/docs"
ap_url = f"http://{host}:{port_ap}/docs"
-c1_url = f"http://{host}:{port_client_base}/docs"
-c2_url = f"http://{host}:{port_client_base + 1}/docs"
+c1_url = f"http://{host}:{c1_port}/docs"
+c2_url = f"http://{host}:{c2_port}/docs"
diff --git a/pkgs/clan-cli/clan_cli/emulate_fastapi.py b/pkgs/clan-cli/clan_cli/emulate_fastapi.py
index 982a1fb..6991680 100644
--- a/pkgs/clan-cli/clan_cli/emulate_fastapi.py
+++ b/pkgs/clan-cli/clan_cli/emulate_fastapi.py
@@ -17,8 +17,8 @@ app_c2 = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True})
apps = [
(app_dlg, config.port_dlg),
(app_ap, config.port_ap),
- (app_c1, config.port_client_base),
- (app_c2, config.port_client_base + 1),
+ (app_c1, config.c1_port),
+ (app_c2, config.c2_port),
]
@@ -79,7 +79,7 @@ def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str |
# TODO send_msg???
-@app_c1.get("/consume_service_from_other_entity", response_class=HTMLResponse)
+@app_c1.get("/v1/print_daemon1", response_class=HTMLResponse)
async def consume_service_from_other_entity_c1() -> HTMLResponse:
html_content = """
@@ -92,7 +92,17 @@ async def consume_service_from_other_entity_c1() -> HTMLResponse:
return HTMLResponse(content=html_content, status_code=200)
-@app_c2.get("/consume_service_from_other_entity", response_class=HTMLResponse)
+@app_c1.get("/v1/print_daemon1/register", response_class=JSONResponse)
+async def register_c1() -> JSONResponse:
+ return JSONResponse(content={"status": "registered"}, status_code=200)
+
+
+@app_c1.get("/v1/print_daemon1/deregister", response_class=JSONResponse)
+async def deregister_c1() -> JSONResponse:
+ return JSONResponse(content={"status": "deregistered"}, status_code=200)
+
+
+@app_c2.get("/v1/print_daemon2", response_class=HTMLResponse)
async def consume_service_from_other_entity_c2() -> HTMLResponse:
html_content = """
@@ -105,6 +115,16 @@ async def consume_service_from_other_entity_c2() -> HTMLResponse:
return HTMLResponse(content=html_content, status_code=200)
+@app_c2.get("/v1/print_daemon1/register", response_class=JSONResponse)
+async def register_c2() -> JSONResponse:
+ return JSONResponse(content={"status": "registered"}, status_code=200)
+
+
+@app_c2.get("/v1/print_daemon1/deregister", response_class=JSONResponse)
+async def deregister_c2() -> JSONResponse:
+ return JSONResponse(content={"status": "deregistered"}, status_code=200)
+
+
@app_ap.get("/ap_list_of_services", response_class=JSONResponse)
async def ap_list_of_services() -> JSONResponse:
res = [
diff --git a/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py b/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py
index 97a01ff..52ce303 100644
--- a/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py
+++ b/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py
@@ -1,6 +1,6 @@
import logging
import time
-from typing import Any, List, Optional
+from typing import Any, List
import httpx
from fastapi import APIRouter, BackgroundTasks, Depends, Query
@@ -42,12 +42,35 @@ def create_service(
@router.post("/api/v1/service_usage", response_model=Service, tags=[Tags.services])
def add_service_usage(
- usage: ServiceUsageCreate, service_uuid: str, db: Session = Depends(sql_db.get_db)
+ usage: ServiceUsageCreate,
+ service_uuid: str = "bdd640fb-0667-1ad1-1c80-317fa3b1799d",
+ db: Session = Depends(sql_db.get_db),
) -> Service:
service = sql_crud.add_service_usage(db, service_uuid, usage)
return service
+@router.put("/api/v1/inc_service_usage", response_model=Service, tags=[Tags.services])
+def inc_service_usage(
+ usage: ServiceUsageCreate,
+ consumer_entity_did: str = "did:sov:test:120",
+ service_uuid: str = "bdd640fb-0667-1ad1-1c80-317fa3b1799d",
+ db: Session = Depends(sql_db.get_db),
+) -> Service:
+ service = sql_crud.increment_service_usage(db, service_uuid, consumer_entity_did)
+ return service
+
+
+@router.put("/api/v1/service", response_model=Service, tags=[Tags.services])
+def update_service(
+ service: ServiceCreate,
+ uuid: str = "bdd640fb-0667-1ad1-1c80-317fa3b1799d",
+ db: Session = Depends(sql_db.get_db),
+) -> Service:
+ service = sql_crud.set_service(db, uuid, service)
+ return service
+
+
@router.get("/api/v1/services", response_model=List[Service], tags=[Tags.services])
def get_all_services(
skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db)
@@ -56,7 +79,9 @@ def get_all_services(
return services
-@router.get("/api/v1/service", response_model=List[Service], tags=[Tags.services])
+@router.get(
+ "/api/v1/service_by_did", response_model=List[Service], tags=[Tags.services]
+)
def get_service_by_did(
entity_did: str = "did:sov:test:120",
skip: int = 0,
@@ -67,6 +92,19 @@ def get_service_by_did(
return service
+@router.get("/api/v1/service", response_model=Service, tags=[Tags.services])
+def get_service_by_uuid(
+ uuid: str = "bdd640fb-0667-1ad1-1c80-317fa3b1799d",
+ skip: int = 0,
+ limit: int = 100,
+ db: Session = Depends(sql_db.get_db),
+) -> sql_models.Service:
+ service = sql_crud.get_service_by_uuid(db, uuid=uuid)
+ if service is None:
+ raise ClanError(f"Service with uuid '{uuid}' not found")
+ return service
+
+
@router.get(
"/api/v1/services_without_entity",
response_model=List[Service],
@@ -121,12 +159,14 @@ def get_all_entities(
return entities
-@router.get("/api/v1/entity", response_model=Optional[Entity], tags=[Tags.entities])
+@router.get("/api/v1/entity", response_model=Entity, tags=[Tags.entities])
def get_entity_by_did(
entity_did: str = "did:sov:test:120",
db: Session = Depends(sql_db.get_db),
-) -> Optional[sql_models.Entity]:
+) -> sql_models.Entity:
entity = sql_crud.get_entity_by_name_or_did(db, name=entity_did)
+ if entity is None:
+ raise ClanError(f"Entity with did '{entity_did}' not found")
return entity
diff --git a/pkgs/clan-cli/clan_cli/webui/schemas.py b/pkgs/clan-cli/clan_cli/webui/schemas.py
index e2508b9..a982686 100644
--- a/pkgs/clan-cli/clan_cli/webui/schemas.py
+++ b/pkgs/clan-cli/clan_cli/webui/schemas.py
@@ -92,15 +92,22 @@ class ServiceUsage(ServiceUsageCreate):
class ServiceBase(BaseModel):
- uuid: str = Field(..., example="8e285c0c-4e40-430a-a477-26b3b81e30df")
+ uuid: str = Field(..., example="bdd640fb-0667-1ad1-1c80-317fa3b1799d")
service_name: str = Field(..., example="Carlos Printing")
service_type: str = Field(..., example="3D Printing")
endpoint_url: str = Field(..., example="http://127.0.0.1:8000")
- status: str = Field(..., example="unknown")
- other: dict = Field(
- ..., example={"action": ["register", "deregister", "delete", "create"]}
- )
+ other: dict = Field(..., example={"test": "test"})
entity_did: str = Field(..., example="did:sov:test:120")
+ status: dict = Field(..., example={"data": ["draft", "registered"]})
+ action: dict = Field(
+ ...,
+ example={
+ "data": [
+ {"name": "register", "path": "/register"},
+ {"name": "deregister", "path": "/deregister"},
+ ]
+ },
+ )
class ServiceCreate(ServiceBase):
diff --git a/pkgs/clan-cli/clan_cli/webui/sql_crud.py b/pkgs/clan-cli/clan_cli/webui/sql_crud.py
index 3eb5591..b95be2e 100644
--- a/pkgs/clan-cli/clan_cli/webui/sql_crud.py
+++ b/pkgs/clan-cli/clan_cli/webui/sql_crud.py
@@ -26,6 +26,7 @@ def create_service(db: Session, service: schemas.ServiceCreate) -> sql_models.Se
status=service.status,
other=service.other,
entity_did=service.entity_did,
+ action=service.action,
)
db_usage = []
for usage in service.usage:
@@ -63,6 +64,25 @@ def set_service_usage(
return db_service
+def set_service(
+ db: Session, service_uuid: str, service: schemas.ServiceCreate
+) -> sql_models.Service:
+ db_service = get_service_by_uuid(db, service_uuid)
+ if db_service is None:
+ raise ClanError(f"Service with uuid '{service_uuid}' not found")
+ db_service.service_name = service.service_name # type: ignore
+ db_service.service_type = service.service_type # type: ignore
+ db_service.endpoint_url = service.endpoint_url # type: ignore
+ db_service.status = service.status # type: ignore
+ db_service.other = service.other # type: ignore
+ db_service.entity_did = service.entity_did # type: ignore
+ db_service.action = service.action # type: ignore
+ db.add(db_service)
+ db.commit()
+ db.refresh(db_service)
+ return db_service
+
+
def add_service_usage(
db: Session, service_uuid: str, usage: schemas.ServiceUsageCreate
) -> sql_models.Service:
diff --git a/pkgs/clan-cli/clan_cli/webui/sql_models.py b/pkgs/clan-cli/clan_cli/webui/sql_models.py
index 7fc86ab..a065e57 100644
--- a/pkgs/clan-cli/clan_cli/webui/sql_models.py
+++ b/pkgs/clan-cli/clan_cli/webui/sql_models.py
@@ -55,23 +55,20 @@ class ServiceUsage(Base):
service = relationship("Service", back_populates="usage")
-class ServiceAbstract(Base):
- __abstract__ = True
+class Service(Base):
+ __tablename__ = "services"
# Queryable body
uuid = Column(Text(length=36), primary_key=True, index=True)
service_name = Column(String, index=True)
service_type = Column(String, index=True)
endpoint_url = Column(String, index=True)
- status = Column(String, index=True)
## Non queryable body ##
# In here we deposit: Action
other = Column(JSON)
-
-
-class Service(ServiceAbstract):
- __tablename__ = "services"
+ status = Column(JSON, index=True)
+ action = Column(JSON, index=True)
## Relations ##
# One entity can have many services
diff --git a/pkgs/clan-cli/tests/openapi_client/api/services_api.py b/pkgs/clan-cli/tests/openapi_client/api/services_api.py
index c3f3f4e..8955601 100644
--- a/pkgs/clan-cli/tests/openapi_client/api/services_api.py
+++ b/pkgs/clan-cli/tests/openapi_client/api/services_api.py
@@ -47,19 +47,19 @@ class ServicesApi:
self.api_client = api_client
@validate_arguments
- def add_service_usage(self, service_uuid : StrictStr, service_usage_create : ServiceUsageCreate, **kwargs) -> Service: # noqa: E501
+ def add_service_usage(self, service_usage_create : ServiceUsageCreate, service_uuid : Optional[StrictStr] = None, **kwargs) -> Service: # noqa: E501
"""Add Service Usage # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.add_service_usage(service_uuid, service_usage_create, async_req=True)
+ >>> thread = api.add_service_usage(service_usage_create, service_uuid, async_req=True)
>>> result = thread.get()
- :param service_uuid: (required)
- :type service_uuid: str
:param service_usage_create: (required)
:type service_usage_create: ServiceUsageCreate
+ :param service_uuid:
+ :type service_uuid: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request.
@@ -75,22 +75,22 @@ class ServicesApi:
if '_preload_content' in kwargs:
message = "Error! Please call the add_service_usage_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
- return self.add_service_usage_with_http_info(service_uuid, service_usage_create, **kwargs) # noqa: E501
+ return self.add_service_usage_with_http_info(service_usage_create, service_uuid, **kwargs) # noqa: E501
@validate_arguments
- def add_service_usage_with_http_info(self, service_uuid : StrictStr, service_usage_create : ServiceUsageCreate, **kwargs) -> ApiResponse: # noqa: E501
+ def add_service_usage_with_http_info(self, service_usage_create : ServiceUsageCreate, service_uuid : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
"""Add Service Usage # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.add_service_usage_with_http_info(service_uuid, service_usage_create, async_req=True)
+ >>> thread = api.add_service_usage_with_http_info(service_usage_create, service_uuid, async_req=True)
>>> result = thread.get()
- :param service_uuid: (required)
- :type service_uuid: str
:param service_usage_create: (required)
:type service_usage_create: ServiceUsageCreate
+ :param service_uuid:
+ :type service_uuid: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
@@ -119,8 +119,8 @@ class ServicesApi:
_params = locals()
_all_params = [
- 'service_uuid',
- 'service_usage_create'
+ 'service_usage_create',
+ 'service_uuid'
]
_all_params.extend(
[
@@ -770,6 +770,161 @@ class ServicesApi:
'422': "HTTPValidationError",
}
+ return self.api_client.call_api(
+ '/api/v1/service_by_did', 'GET',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ response_types_map=_response_types_map,
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def get_service_by_uuid(self, uuid : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> Service: # noqa: E501
+ """Get Service By Uuid # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_service_by_uuid(uuid, skip, limit, async_req=True)
+ >>> result = thread.get()
+
+ :param uuid:
+ :type uuid: str
+ :param skip:
+ :type skip: int
+ :param limit:
+ :type limit: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _request_timeout: timeout setting for this request.
+ If one number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: Service
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the get_service_by_uuid_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.get_service_by_uuid_with_http_info(uuid, skip, limit, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def get_service_by_uuid_with_http_info(self, uuid : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Get Service By Uuid # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_service_by_uuid_with_http_info(uuid, skip, limit, async_req=True)
+ >>> result = thread.get()
+
+ :param uuid:
+ :type uuid: str
+ :param skip:
+ :type skip: int
+ :param limit:
+ :type limit: int
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'uuid',
+ 'skip',
+ 'limit'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_service_by_uuid" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('uuid') is not None: # noqa: E501
+ _query_params.append(('uuid', _params['uuid']))
+
+ if _params.get('skip') is not None: # noqa: E501
+ _query_params.append(('skip', _params['skip']))
+
+ if _params.get('limit') is not None: # noqa: E501
+ _query_params.append(('limit', _params['limit']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # authentication setting
+ _auth_settings = [] # noqa: E501
+
+ _response_types_map = {
+ '200': "Service",
+ '422': "HTTPValidationError",
+ }
+
return self.api_client.call_api(
'/api/v1/service', 'GET',
_path_params,
@@ -941,3 +1096,165 @@ class ServicesApi:
_request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
+
+ @validate_arguments
+ def inc_service_usage(self, service_usage_create : ServiceUsageCreate, consumer_entity_did : Optional[StrictStr] = None, service_uuid : Optional[StrictStr] = None, **kwargs) -> Service: # noqa: E501
+ """Inc Service Usage # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.inc_service_usage(service_usage_create, consumer_entity_did, service_uuid, async_req=True)
+ >>> result = thread.get()
+
+ :param service_usage_create: (required)
+ :type service_usage_create: ServiceUsageCreate
+ :param consumer_entity_did:
+ :type consumer_entity_did: str
+ :param service_uuid:
+ :type service_uuid: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _request_timeout: timeout setting for this request.
+ If one number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: Service
+ """
+ kwargs['_return_http_data_only'] = True
+ if '_preload_content' in kwargs:
+ message = "Error! Please call the inc_service_usage_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
+ raise ValueError(message)
+ return self.inc_service_usage_with_http_info(service_usage_create, consumer_entity_did, service_uuid, **kwargs) # noqa: E501
+
+ @validate_arguments
+ def inc_service_usage_with_http_info(self, service_usage_create : ServiceUsageCreate, consumer_entity_did : Optional[StrictStr] = None, service_uuid : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501
+ """Inc Service Usage # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.inc_service_usage_with_http_info(service_usage_create, consumer_entity_did, service_uuid, async_req=True)
+ >>> result = thread.get()
+
+ :param service_usage_create: (required)
+ :type service_usage_create: ServiceUsageCreate
+ :param consumer_entity_did:
+ :type consumer_entity_did: str
+ :param service_uuid:
+ :type service_uuid: str
+ :param async_req: Whether to execute the request asynchronously.
+ :type async_req: bool, optional
+ :param _preload_content: if False, the ApiResponse.data will
+ be set to none and raw_data will store the
+ HTTP response body without reading/decoding.
+ Default is True.
+ :type _preload_content: bool, optional
+ :param _return_http_data_only: response data instead of ApiResponse
+ object with status code, headers, etc
+ :type _return_http_data_only: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :type _request_auth: dict, optional
+ :type _content_type: string, optional: force content-type for the request
+ :return: Returns the result object.
+ If the method is called asynchronously,
+ returns the request thread.
+ :rtype: tuple(Service, status_code(int), headers(HTTPHeaderDict))
+ """
+
+ _params = locals()
+
+ _all_params = [
+ 'service_usage_create',
+ 'consumer_entity_did',
+ 'service_uuid'
+ ]
+ _all_params.extend(
+ [
+ 'async_req',
+ '_return_http_data_only',
+ '_preload_content',
+ '_request_timeout',
+ '_request_auth',
+ '_content_type',
+ '_headers'
+ ]
+ )
+
+ # validate the arguments
+ for _key, _val in _params['kwargs'].items():
+ if _key not in _all_params:
+ raise ApiTypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method inc_service_usage" % _key
+ )
+ _params[_key] = _val
+ del _params['kwargs']
+
+ _collection_formats = {}
+
+ # process the path parameters
+ _path_params = {}
+
+ # process the query parameters
+ _query_params = []
+ if _params.get('consumer_entity_did') is not None: # noqa: E501
+ _query_params.append(('consumer_entity_did', _params['consumer_entity_did']))
+
+ if _params.get('service_uuid') is not None: # noqa: E501
+ _query_params.append(('service_uuid', _params['service_uuid']))
+
+ # process the header parameters
+ _header_params = dict(_params.get('_headers', {}))
+ # process the form parameters
+ _form_params = []
+ _files = {}
+ # process the body parameter
+ _body_params = None
+ if _params['service_usage_create'] is not None:
+ _body_params = _params['service_usage_create']
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # set the HTTP header `Content-Type`
+ _content_types_list = _params.get('_content_type',
+ self.api_client.select_header_content_type(
+ ['application/json']))
+ if _content_types_list:
+ _header_params['Content-Type'] = _content_types_list
+
+ # authentication setting
+ _auth_settings = [] # noqa: E501
+
+ _response_types_map = {
+ '200': "Service",
+ '422': "HTTPValidationError",
+ }
+
+ return self.api_client.call_api(
+ '/api/v1/inc_service_usage', 'PUT',
+ _path_params,
+ _query_params,
+ _header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ response_types_map=_response_types_map,
+ auth_settings=_auth_settings,
+ async_req=_params.get('async_req'),
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
+ _preload_content=_params.get('_preload_content', True),
+ _request_timeout=_params.get('_request_timeout'),
+ collection_formats=_collection_formats,
+ _request_auth=_params.get('_request_auth'))
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md b/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md
index eff1088..1f58c99 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md
@@ -1,16 +1,16 @@
# openapi_client.DefaultApi
-All URIs are relative to _http://localhost_
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get**](DefaultApi.md#get) | **GET** /ws2_example | Get
+[**get_emulated_enpoints**](DefaultApi.md#get_emulated_enpoints) | **GET** /emulate | Get Emulated Enpoints
+[**health**](DefaultApi.md#health) | **GET** /health | Health
+[**root**](DefaultApi.md#root) | **GET** /{path_name} | Root
-| Method | HTTP request | Description |
-| ---------------------------------------------------------------- | -------------------- | --------------------- |
-| [**get**](DefaultApi.md#get) | **GET** /ws2_example | Get |
-| [**get_emulated_enpoints**](DefaultApi.md#get_emulated_enpoints) | **GET** /emulate | Get Emulated Enpoints |
-| [**health**](DefaultApi.md#health) | **GET** /health | Health |
-| [**root**](DefaultApi.md#root) | **GET** /{path_name} | Root |
# **get**
-
> get()
Get
@@ -43,8 +43,9 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling DefaultApi->get: %s\n" % e)
```
-### Parameters
+
+### Parameters
This endpoint does not need any parameter.
### Return type
@@ -57,19 +58,17 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Successful Response | - |
[[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_emulated_enpoints**
-
> str get_emulated_enpoints()
Get Emulated Enpoints
@@ -104,8 +103,9 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling DefaultApi->get_emulated_enpoints: %s\n" % e)
```
-### Parameters
+
+### Parameters
This endpoint does not need any parameter.
### Return type
@@ -118,19 +118,17 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: text/html
+ - **Content-Type**: Not defined
+ - **Accept**: text/html
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Successful Response | - |
[[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)
# **health**
-
> Machine health()
Health
@@ -166,8 +164,9 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling DefaultApi->health: %s\n" % e)
```
-### Parameters
+
+### Parameters
This endpoint does not need any parameter.
### Return type
@@ -180,19 +179,17 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Successful Response | - |
[[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)
# **root**
-
> root(path_name)
Root
@@ -217,7 +214,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
- path_name = 'path_name_example' # str |
+ path_name = 'path_name_example' # str |
try:
# Root
@@ -226,11 +223,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling DefaultApi->root: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| ------------- | ------- | ----------- | ----- |
-| **path_name** | **str** | |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **path_name** | **str**| |
### Return type
@@ -242,14 +241,14 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md b/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md
index 2092729..f38cee6 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md
@@ -1,21 +1,21 @@
# openapi_client.EntitiesApi
-All URIs are relative to _http://localhost_
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**attach_entity**](EntitiesApi.md#attach_entity) | **PUT** /api/v1/attach | Attach Entity
+[**create_entity**](EntitiesApi.md#create_entity) | **POST** /api/v1/entity | Create Entity
+[**delete_entity**](EntitiesApi.md#delete_entity) | **DELETE** /api/v1/entity | Delete Entity
+[**detach_entity**](EntitiesApi.md#detach_entity) | **PUT** /api/v1/detach | Detach Entity
+[**get_all_entities**](EntitiesApi.md#get_all_entities) | **GET** /api/v1/entities | Get All Entities
+[**get_attached_entities**](EntitiesApi.md#get_attached_entities) | **GET** /api/v1/attached_entities | Get Attached Entities
+[**get_entity_by_did**](EntitiesApi.md#get_entity_by_did) | **GET** /api/v1/entity | Get Entity By Did
+[**get_entity_by_roles**](EntitiesApi.md#get_entity_by_roles) | **GET** /api/v1/entity_by_roles | Get Entity By Roles
+[**is_attached**](EntitiesApi.md#is_attached) | **GET** /api/v1/is_attached | Is Attached
-| Method | HTTP request | Description |
-| ----------------------------------------------------------------- | --------------------------------- | --------------------- |
-| [**attach_entity**](EntitiesApi.md#attach_entity) | **PUT** /api/v1/attach | Attach Entity |
-| [**create_entity**](EntitiesApi.md#create_entity) | **POST** /api/v1/entity | Create Entity |
-| [**delete_entity**](EntitiesApi.md#delete_entity) | **DELETE** /api/v1/entity | Delete Entity |
-| [**detach_entity**](EntitiesApi.md#detach_entity) | **PUT** /api/v1/detach | Detach Entity |
-| [**get_all_entities**](EntitiesApi.md#get_all_entities) | **GET** /api/v1/entities | Get All Entities |
-| [**get_attached_entities**](EntitiesApi.md#get_attached_entities) | **GET** /api/v1/attached_entities | Get Attached Entities |
-| [**get_entity_by_did**](EntitiesApi.md#get_entity_by_did) | **GET** /api/v1/entity | Get Entity By Did |
-| [**get_entity_by_roles**](EntitiesApi.md#get_entity_by_roles) | **GET** /api/v1/entity_by_roles | Get Entity By Roles |
-| [**is_attached**](EntitiesApi.md#is_attached) | **GET** /api/v1/is_attached | Is Attached |
# **attach_entity**
-
> Dict[str, str] attach_entity(entity_did=entity_did, skip=skip, limit=limit)
Attach Entity
@@ -53,13 +53,15 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->attach_entity: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -71,20 +73,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
# **create_entity**
-
> Entity create_entity(entity_create)
Create Entity
@@ -111,7 +111,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.EntitiesApi(api_client)
- entity_create = openapi_client.EntityCreate() # EntityCreate |
+ entity_create = openapi_client.EntityCreate() # EntityCreate |
try:
# Create Entity
@@ -122,11 +122,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->create_entity: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| ----------------- | ----------------------------------- | ----------- | ----- |
-| **entity_create** | [**EntityCreate**](EntityCreate.md) | |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_create** | [**EntityCreate**](EntityCreate.md)| |
### Return type
@@ -138,20 +140,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: application/json
-- **Accept**: application/json
+ - **Content-Type**: application/json
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
# **delete_entity**
-
> Dict[str, str] delete_entity(entity_did=entity_did)
Delete Entity
@@ -187,11 +187,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->delete_entity: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
### Return type
@@ -203,20 +205,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
# **detach_entity**
-
> Dict[str, str] detach_entity(entity_did=entity_did, skip=skip, limit=limit)
Detach Entity
@@ -254,13 +254,15 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->detach_entity: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -272,20 +274,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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_all_entities**
-
> List[Entity] get_all_entities(skip=skip, limit=limit)
Get All Entities
@@ -323,12 +323,14 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->get_all_entities: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| --------- | ------- | ----------- | --------------------------- |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -340,20 +342,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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_attached_entities**
-
> List[Entity] get_attached_entities(skip=skip, limit=limit)
Get Attached Entities
@@ -391,12 +391,14 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->get_attached_entities: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| --------- | ------- | ----------- | --------------------------- |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -408,20 +410,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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_entity_by_did**
-
> Entity get_entity_by_did(entity_did=entity_did)
Get Entity By Did
@@ -458,11 +458,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->get_entity_by_did: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
### Return type
@@ -474,20 +476,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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_entity_by_roles**
-
> List[Entity] get_entity_by_roles(roles)
Get Entity By Roles
@@ -514,7 +514,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.EntitiesApi(api_client)
- roles = [openapi_client.Role()] # List[Role] |
+ roles = [openapi_client.Role()] # List[Role] |
try:
# Get Entity By Roles
@@ -525,11 +525,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->get_entity_by_roles: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| --------- | ------------------------- | ----------- | ----- |
-| **roles** | [**List[Role]**](Role.md) | |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **roles** | [**List[Role]**](Role.md)| |
### Return type
@@ -541,20 +543,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
# **is_attached**
-
> Dict[str, str] is_attached(entity_did=entity_did)
Is Attached
@@ -590,11 +590,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EntitiesApi->is_attached: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
### Return type
@@ -606,14 +608,14 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md
index 83b3b80..28ab2fe 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md
@@ -1,18 +1,18 @@
# Entity
-## Properties
-| Name | Type | Description | Notes |
-| -------------------- | ------------------------- | ----------- | ----- |
-| **did** | **str** | |
-| **name** | **str** | |
-| **ip** | **str** | |
-| **network** | **str** | |
-| **visible** | **bool** | |
-| **other** | **object** | |
-| **attached** | **bool** | |
-| **stop_health_task** | **bool** | |
-| **roles** | [**List[Role]**](Role.md) | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**did** | **str** | |
+**name** | **str** | |
+**ip** | **str** | |
+**network** | **str** | |
+**visible** | **bool** | |
+**other** | **object** | |
+**attached** | **bool** | |
+**stop_health_task** | **bool** | |
+**roles** | [**List[Role]**](Role.md) | |
## Example
@@ -31,5 +31,6 @@ entity_dict = entity_instance.to_dict()
# create an instance of Entity from a dict
entity_form_dict = entity.from_dict(entity_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md b/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md
index 2b06e83..6fd6c44 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md
@@ -1,16 +1,16 @@
# EntityCreate
-## Properties
-| Name | Type | Description | Notes |
-| ----------- | ------------------------- | ----------- | ----- |
-| **did** | **str** | |
-| **name** | **str** | |
-| **ip** | **str** | |
-| **network** | **str** | |
-| **visible** | **bool** | |
-| **other** | **object** | |
-| **roles** | [**List[Role]**](Role.md) | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**did** | **str** | |
+**name** | **str** | |
+**ip** | **str** | |
+**network** | **str** | |
+**visible** | **bool** | |
+**other** | **object** | |
+**roles** | [**List[Role]**](Role.md) | |
## Example
@@ -29,5 +29,6 @@ entity_create_dict = entity_create_instance.to_dict()
# create an instance of EntityCreate from a dict
entity_create_form_dict = entity_create.from_dict(entity_create_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Eventmessage.md b/pkgs/clan-cli/tests/openapi_client/docs/Eventmessage.md
index 96427cd..ee4ed36 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/Eventmessage.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/Eventmessage.md
@@ -1,17 +1,17 @@
# Eventmessage
-## Properties
-| Name | Type | Description | Notes |
-| ------------- | ---------- | ----------- | ----- |
-| **timestamp** | **int** | |
-| **group** | **int** | |
-| **group_id** | **int** | |
-| **msg_type** | **int** | |
-| **src_did** | **str** | |
-| **des_did** | **str** | |
-| **msg** | **object** | |
-| **id** | **int** | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**timestamp** | **int** | |
+**group** | **int** | |
+**group_id** | **int** | |
+**msg_type** | **int** | |
+**src_did** | **str** | |
+**des_did** | **str** | |
+**msg** | **object** | |
+**id** | **int** | |
## Example
@@ -30,5 +30,6 @@ eventmessage_dict = eventmessage_instance.to_dict()
# create an instance of Eventmessage from a dict
eventmessage_form_dict = eventmessage.from_dict(eventmessage_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md b/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md
index 4ed2b69..31742cc 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md
@@ -1,16 +1,16 @@
# EventmessageCreate
-## Properties
-| Name | Type | Description | Notes |
-| ------------- | ---------- | ----------- | ----- |
-| **timestamp** | **int** | |
-| **group** | **int** | |
-| **group_id** | **int** | |
-| **msg_type** | **int** | |
-| **src_did** | **str** | |
-| **des_did** | **str** | |
-| **msg** | **object** | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**timestamp** | **int** | |
+**group** | **int** | |
+**group_id** | **int** | |
+**msg_type** | **int** | |
+**src_did** | **str** | |
+**des_did** | **str** | |
+**msg** | **object** | |
## Example
@@ -29,5 +29,6 @@ eventmessage_create_dict = eventmessage_create_instance.to_dict()
# create an instance of EventmessageCreate from a dict
eventmessage_create_form_dict = eventmessage_create.from_dict(eventmessage_create_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/EventmessagesApi.md b/pkgs/clan-cli/tests/openapi_client/docs/EventmessagesApi.md
index c8f26b1..c752559 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/EventmessagesApi.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/EventmessagesApi.md
@@ -1,14 +1,14 @@
# openapi_client.EventmessagesApi
-All URIs are relative to _http://localhost_
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_eventmessage**](EventmessagesApi.md#create_eventmessage) | **POST** /api/v1/event_message | Create Eventmessage
+[**get_all_eventmessages**](EventmessagesApi.md#get_all_eventmessages) | **GET** /api/v1/event_messages | Get All Eventmessages
-| Method | HTTP request | Description |
-| ---------------------------------------------------------------------- | ------------------------------ | --------------------- |
-| [**create_eventmessage**](EventmessagesApi.md#create_eventmessage) | **POST** /api/v1/event_message | Create Eventmessage |
-| [**get_all_eventmessages**](EventmessagesApi.md#get_all_eventmessages) | **GET** /api/v1/event_messages | Get All Eventmessages |
# **create_eventmessage**
-
> Eventmessage create_eventmessage(eventmessage_create)
Create Eventmessage
@@ -35,7 +35,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.EventmessagesApi(api_client)
- eventmessage_create = openapi_client.EventmessageCreate() # EventmessageCreate |
+ eventmessage_create = openapi_client.EventmessageCreate() # EventmessageCreate |
try:
# Create Eventmessage
@@ -46,11 +46,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EventmessagesApi->create_eventmessage: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| ----------------------- | ----------------------------------------------- | ----------- | ----- |
-| **eventmessage_create** | [**EventmessageCreate**](EventmessageCreate.md) | |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **eventmessage_create** | [**EventmessageCreate**](EventmessageCreate.md)| |
### Return type
@@ -62,20 +64,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: application/json
-- **Accept**: application/json
+ - **Content-Type**: application/json
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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_all_eventmessages**
-
> List[Eventmessage] get_all_eventmessages(skip=skip, limit=limit)
Get All Eventmessages
@@ -113,12 +113,14 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling EventmessagesApi->get_all_eventmessages: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| --------- | ------- | ----------- | --------------------------- |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -130,14 +132,14 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/HTTPValidationError.md b/pkgs/clan-cli/tests/openapi_client/docs/HTTPValidationError.md
index d4902e7..5eee49b 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/HTTPValidationError.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/HTTPValidationError.md
@@ -1,10 +1,10 @@
# HTTPValidationError
-## Properties
-| Name | Type | Description | Notes |
-| ---------- | ----------------------------------------------- | ----------- | ---------- |
-| **detail** | [**List[ValidationError]**](ValidationError.md) | | [optional] |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**detail** | [**List[ValidationError]**](ValidationError.md) | | [optional]
## Example
@@ -23,5 +23,6 @@ http_validation_error_dict = http_validation_error_instance.to_dict()
# create an instance of HTTPValidationError from a dict
http_validation_error_form_dict = http_validation_error.from_dict(http_validation_error_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Machine.md b/pkgs/clan-cli/tests/openapi_client/docs/Machine.md
index 062fd51..4ea6dc3 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/Machine.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/Machine.md
@@ -1,11 +1,11 @@
# Machine
-## Properties
-| Name | Type | Description | Notes |
-| ---------- | ----------------------- | ----------- | ----- |
-| **name** | **str** | |
-| **status** | [**Status**](Status.md) | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | |
+**status** | [**Status**](Status.md) | |
## Example
@@ -24,5 +24,6 @@ machine_dict = machine_instance.to_dict()
# create an instance of Machine from a dict
machine_form_dict = machine.from_dict(machine_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/RepositoriesApi.md b/pkgs/clan-cli/tests/openapi_client/docs/RepositoriesApi.md
index ff735f0..7a24ab0 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/RepositoriesApi.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/RepositoriesApi.md
@@ -1,13 +1,13 @@
# openapi_client.RepositoriesApi
-All URIs are relative to _http://localhost_
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_all_repositories**](RepositoriesApi.md#get_all_repositories) | **GET** /api/v1/repositories | Get All Repositories
-| Method | HTTP request | Description |
-| ------------------------------------------------------------------- | ---------------------------- | -------------------- |
-| [**get_all_repositories**](RepositoriesApi.md#get_all_repositories) | **GET** /api/v1/repositories | Get All Repositories |
# **get_all_repositories**
-
> List[Service] get_all_repositories(skip=skip, limit=limit)
Get All Repositories
@@ -45,12 +45,14 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling RepositoriesApi->get_all_repositories: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| --------- | ------- | ----------- | --------------------------- |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -62,14 +64,14 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md b/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md
index 2f849e8..863010d 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md
@@ -1,14 +1,14 @@
# Resolution
-## Properties
-| Name | Type | Description | Notes |
-| ------------------ | ------------ | ----------- | ----- |
-| **requester_name** | **str** | |
-| **requester_did** | **str** | |
-| **resolved_did** | **str** | |
-| **other** | **object** | |
-| **timestamp** | **datetime** | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**requester_name** | **str** | |
+**requester_did** | **str** | |
+**resolved_did** | **str** | |
+**other** | **object** | |
+**timestamp** | **datetime** | |
## Example
@@ -27,5 +27,6 @@ resolution_dict = resolution_instance.to_dict()
# create an instance of Resolution from a dict
resolution_form_dict = resolution.from_dict(resolution_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/ResolutionApi.md b/pkgs/clan-cli/tests/openapi_client/docs/ResolutionApi.md
index 24da5fb..a2ae852 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/ResolutionApi.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/ResolutionApi.md
@@ -1,13 +1,13 @@
# openapi_client.ResolutionApi
-All URIs are relative to _http://localhost_
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_all_resolutions**](ResolutionApi.md#get_all_resolutions) | **GET** /api/v1/resolutions | Get All Resolutions
-| Method | HTTP request | Description |
-| --------------------------------------------------------------- | --------------------------- | ------------------- |
-| [**get_all_resolutions**](ResolutionApi.md#get_all_resolutions) | **GET** /api/v1/resolutions | Get All Resolutions |
# **get_all_resolutions**
-
> List[Resolution] get_all_resolutions(skip=skip, limit=limit)
Get All Resolutions
@@ -45,12 +45,14 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling ResolutionApi->get_all_resolutions: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| --------- | ------- | ----------- | --------------------------- |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -62,14 +64,14 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Role.md b/pkgs/clan-cli/tests/openapi_client/docs/Role.md
index a60cc52..cc36293 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/Role.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/Role.md
@@ -3,8 +3,9 @@
An enumeration.
## Properties
-
-| Name | Type | Description | Notes |
-| ---- | ---- | ----------- | ----- |
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Service.md b/pkgs/clan-cli/tests/openapi_client/docs/Service.md
index 023e28c..4091175 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/Service.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/Service.md
@@ -1,17 +1,18 @@
# Service
-## Properties
-| Name | Type | Description | Notes |
-| ---------------- | ----------------------------------------- | ----------- | ----- |
-| **uuid** | **str** | |
-| **service_name** | **str** | |
-| **service_type** | **str** | |
-| **endpoint_url** | **str** | |
-| **status** | **str** | |
-| **other** | **object** | |
-| **entity_did** | **str** | |
-| **usage** | [**List[ServiceUsage]**](ServiceUsage.md) | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uuid** | **str** | |
+**service_name** | **str** | |
+**service_type** | **str** | |
+**endpoint_url** | **str** | |
+**other** | **object** | |
+**entity_did** | **str** | |
+**status** | **object** | |
+**action** | **object** | |
+**usage** | [**List[ServiceUsage]**](ServiceUsage.md) | |
## Example
@@ -30,5 +31,6 @@ service_dict = service_instance.to_dict()
# create an instance of Service from a dict
service_form_dict = service.from_dict(service_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md b/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md
index e490a6d..638bd9c 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md
@@ -1,17 +1,18 @@
# ServiceCreate
-## Properties
-| Name | Type | Description | Notes |
-| ---------------- | ----------------------------------------------------- | ----------- | ----- |
-| **uuid** | **str** | |
-| **service_name** | **str** | |
-| **service_type** | **str** | |
-| **endpoint_url** | **str** | |
-| **status** | **str** | |
-| **other** | **object** | |
-| **entity_did** | **str** | |
-| **usage** | [**List[ServiceUsageCreate]**](ServiceUsageCreate.md) | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uuid** | **str** | |
+**service_name** | **str** | |
+**service_type** | **str** | |
+**endpoint_url** | **str** | |
+**other** | **object** | |
+**entity_did** | **str** | |
+**status** | **object** | |
+**action** | **object** | |
+**usage** | [**List[ServiceUsageCreate]**](ServiceUsageCreate.md) | |
## Example
@@ -30,5 +31,6 @@ service_create_dict = service_create_instance.to_dict()
# create an instance of ServiceCreate from a dict
service_create_form_dict = service_create.from_dict(service_create_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsage.md b/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsage.md
index 86059b8..9c697c1 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsage.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsage.md
@@ -1,11 +1,11 @@
# ServiceUsage
-## Properties
-| Name | Type | Description | Notes |
-| ----------------------- | ------- | ----------- | ----- |
-| **times_consumed** | **int** | |
-| **consumer_entity_did** | **str** | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**times_consumed** | **int** | |
+**consumer_entity_did** | **str** | |
## Example
@@ -24,5 +24,6 @@ service_usage_dict = service_usage_instance.to_dict()
# create an instance of ServiceUsage from a dict
service_usage_form_dict = service_usage.from_dict(service_usage_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsageCreate.md b/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsageCreate.md
index d897943..879e8f5 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsageCreate.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/ServiceUsageCreate.md
@@ -1,11 +1,11 @@
# ServiceUsageCreate
-## Properties
-| Name | Type | Description | Notes |
-| ----------------------- | ------- | ----------- | ----- |
-| **times_consumed** | **int** | |
-| **consumer_entity_did** | **str** | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**times_consumed** | **int** | |
+**consumer_entity_did** | **str** | |
## Example
@@ -24,5 +24,6 @@ service_usage_create_dict = service_usage_create_instance.to_dict()
# create an instance of ServiceUsageCreate from a dict
service_usage_create_form_dict = service_usage_create.from_dict(service_usage_create_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md b/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md
index cdcd92b..c2c0542 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md
@@ -1,19 +1,21 @@
# openapi_client.ServicesApi
-All URIs are relative to _http://localhost_
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**add_service_usage**](ServicesApi.md#add_service_usage) | **POST** /api/v1/service_usage | Add Service Usage
+[**create_service**](ServicesApi.md#create_service) | **POST** /api/v1/service | Create Service
+[**delete_service**](ServicesApi.md#delete_service) | **DELETE** /api/v1/service | Delete Service
+[**get_all_services**](ServicesApi.md#get_all_services) | **GET** /api/v1/services | Get All Services
+[**get_service_by_did**](ServicesApi.md#get_service_by_did) | **GET** /api/v1/service_by_did | Get Service By Did
+[**get_service_by_uuid**](ServicesApi.md#get_service_by_uuid) | **GET** /api/v1/service | Get Service By Uuid
+[**get_services_without_entity**](ServicesApi.md#get_services_without_entity) | **GET** /api/v1/services_without_entity | Get Services Without Entity
+[**inc_service_usage**](ServicesApi.md#inc_service_usage) | **PUT** /api/v1/inc_service_usage | Inc Service Usage
-| Method | HTTP request | Description |
-| ----------------------------------------------------------------------------- | --------------------------------------- | --------------------------- |
-| [**add_service_usage**](ServicesApi.md#add_service_usage) | **POST** /api/v1/service_usage | Add Service Usage |
-| [**create_service**](ServicesApi.md#create_service) | **POST** /api/v1/service | Create Service |
-| [**delete_service**](ServicesApi.md#delete_service) | **DELETE** /api/v1/service | Delete Service |
-| [**get_all_services**](ServicesApi.md#get_all_services) | **GET** /api/v1/services | Get All Services |
-| [**get_service_by_did**](ServicesApi.md#get_service_by_did) | **GET** /api/v1/service | Get Service By Did |
-| [**get_services_without_entity**](ServicesApi.md#get_services_without_entity) | **GET** /api/v1/services_without_entity | Get Services Without Entity |
# **add_service_usage**
-
-> Service add_service_usage(service_uuid, service_usage_create)
+> Service add_service_usage(service_usage_create, service_uuid=service_uuid)
Add Service Usage
@@ -39,24 +41,26 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.ServicesApi(api_client)
- service_uuid = 'service_uuid_example' # str |
- service_usage_create = openapi_client.ServiceUsageCreate() # ServiceUsageCreate |
+ service_usage_create = openapi_client.ServiceUsageCreate() # ServiceUsageCreate |
+ service_uuid = 'bdd640fb-0667-1ad1-1c80-317fa3b1799d' # str | (optional) (default to 'bdd640fb-0667-1ad1-1c80-317fa3b1799d')
try:
# Add Service Usage
- api_response = api_instance.add_service_usage(service_uuid, service_usage_create)
+ api_response = api_instance.add_service_usage(service_usage_create, service_uuid=service_uuid)
print("The response of ServicesApi->add_service_usage:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ServicesApi->add_service_usage: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| ------------------------ | ----------------------------------------------- | ----------- | ----- |
-| **service_uuid** | **str** | |
-| **service_usage_create** | [**ServiceUsageCreate**](ServiceUsageCreate.md) | |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **service_usage_create** | [**ServiceUsageCreate**](ServiceUsageCreate.md)| |
+ **service_uuid** | **str**| | [optional] [default to 'bdd640fb-0667-1ad1-1c80-317fa3b1799d']
### Return type
@@ -68,20 +72,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: application/json
-- **Accept**: application/json
+ - **Content-Type**: application/json
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
# **create_service**
-
> Service create_service(service_create)
Create Service
@@ -108,7 +110,7 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.ServicesApi(api_client)
- service_create = openapi_client.ServiceCreate() # ServiceCreate |
+ service_create = openapi_client.ServiceCreate() # ServiceCreate |
try:
# Create Service
@@ -119,11 +121,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling ServicesApi->create_service: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| ------------------ | ------------------------------------- | ----------- | ----- |
-| **service_create** | [**ServiceCreate**](ServiceCreate.md) | |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **service_create** | [**ServiceCreate**](ServiceCreate.md)| |
### Return type
@@ -135,20 +139,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: application/json
-- **Accept**: application/json
+ - **Content-Type**: application/json
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
# **delete_service**
-
> Dict[str, str] delete_service(entity_did=entity_did)
Delete Service
@@ -184,11 +186,13 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling ServicesApi->delete_service: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
### Return type
@@ -200,20 +204,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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_all_services**
-
> List[Service] get_all_services(skip=skip, limit=limit)
Get All Services
@@ -251,12 +253,14 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling ServicesApi->get_all_services: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| --------- | ------- | ----------- | --------------------------- |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -268,20 +272,18 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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_service_by_did**
-
> List[Service] get_service_by_did(entity_did=entity_did, skip=skip, limit=limit)
Get Service By Did
@@ -320,13 +322,15 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling ServicesApi->get_service_by_did: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -338,20 +342,88 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Successful Response | - |
+**422** | Validation Error | - |
-| 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_service_by_uuid**
+> Service get_service_by_uuid(uuid=uuid, skip=skip, limit=limit)
+
+Get Service By Uuid
+
+### Example
+
+```python
+import time
+import os
+import openapi_client
+from openapi_client.models.service import Service
+from openapi_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 = openapi_client.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with openapi_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = openapi_client.ServicesApi(api_client)
+ uuid = 'bdd640fb-0667-1ad1-1c80-317fa3b1799d' # str | (optional) (default to 'bdd640fb-0667-1ad1-1c80-317fa3b1799d')
+ skip = 0 # int | (optional) (default to 0)
+ limit = 100 # int | (optional) (default to 100)
+
+ try:
+ # Get Service By Uuid
+ api_response = api_instance.get_service_by_uuid(uuid=uuid, skip=skip, limit=limit)
+ print("The response of ServicesApi->get_service_by_uuid:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ServicesApi->get_service_by_uuid: %s\n" % e)
+```
+
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **uuid** | **str**| | [optional] [default to 'bdd640fb-0667-1ad1-1c80-317fa3b1799d']
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
+
+### Return type
+
+[**Service**](Service.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **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_services_without_entity**
-
> List[Service] get_services_without_entity(entity_did=entity_did, skip=skip, limit=limit)
Get Services Without Entity
@@ -390,13 +462,15 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling ServicesApi->get_services_without_entity: %s\n" % e)
```
+
+
### Parameters
-| Name | Type | Description | Notes |
-| -------------- | ------- | ----------- | -------------------------------------------------- |
-| **entity_did** | **str** | | [optional] [default to 'did:sov:test:120'] |
-| **skip** | **int** | | [optional] [default to 0] |
-| **limit** | **int** | | [optional] [default to 100] |
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
+ **skip** | **int**| | [optional] [default to 0]
+ **limit** | **int**| | [optional] [default to 100]
### Return type
@@ -408,14 +482,85 @@ No authorization required
### HTTP request headers
-- **Content-Type**: Not defined
-- **Accept**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
### HTTP response details
-
-| Status code | Description | Response headers |
-| ----------- | ------------------- | ---------------- |
-| **200** | Successful Response | - |
-| **422** | Validation Error | - |
+| 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)
+
+# **inc_service_usage**
+> Service inc_service_usage(service_usage_create, consumer_entity_did=consumer_entity_did, service_uuid=service_uuid)
+
+Inc Service Usage
+
+### Example
+
+```python
+import time
+import os
+import openapi_client
+from openapi_client.models.service import Service
+from openapi_client.models.service_usage_create import ServiceUsageCreate
+from openapi_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 = openapi_client.Configuration(
+ host = "http://localhost"
+)
+
+
+# Enter a context with an instance of the API client
+with openapi_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = openapi_client.ServicesApi(api_client)
+ service_usage_create = openapi_client.ServiceUsageCreate() # ServiceUsageCreate |
+ consumer_entity_did = 'did:sov:test:120' # str | (optional) (default to 'did:sov:test:120')
+ service_uuid = 'bdd640fb-0667-1ad1-1c80-317fa3b1799d' # str | (optional) (default to 'bdd640fb-0667-1ad1-1c80-317fa3b1799d')
+
+ try:
+ # Inc Service Usage
+ api_response = api_instance.inc_service_usage(service_usage_create, consumer_entity_did=consumer_entity_did, service_uuid=service_uuid)
+ print("The response of ServicesApi->inc_service_usage:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling ServicesApi->inc_service_usage: %s\n" % e)
+```
+
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **service_usage_create** | [**ServiceUsageCreate**](ServiceUsageCreate.md)| |
+ **consumer_entity_did** | **str**| | [optional] [default to 'did:sov:test:120']
+ **service_uuid** | **str**| | [optional] [default to 'bdd640fb-0667-1ad1-1c80-317fa3b1799d']
+
+### Return type
+
+[**Service**](Service.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)
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Status.md b/pkgs/clan-cli/tests/openapi_client/docs/Status.md
index 10bd223..3b89cf4 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/Status.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/Status.md
@@ -3,8 +3,9 @@
An enumeration.
## Properties
-
-| Name | Type | Description | Notes |
-| ---- | ---- | ----------- | ----- |
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/ValidationError.md b/pkgs/clan-cli/tests/openapi_client/docs/ValidationError.md
index b57b565..04310f6 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/ValidationError.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/ValidationError.md
@@ -1,12 +1,12 @@
# ValidationError
-## Properties
-| Name | Type | Description | Notes |
-| -------- | --------------------------------------------------------------- | ----------- | ----- |
-| **loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | |
-| **msg** | **str** | |
-| **type** | **str** | |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | |
+**msg** | **str** | |
+**type** | **str** | |
## Example
@@ -25,5 +25,6 @@ validation_error_dict = validation_error_instance.to_dict()
# create an instance of ValidationError from a dict
validation_error_form_dict = validation_error.from_dict(validation_error_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/docs/ValidationErrorLocInner.md b/pkgs/clan-cli/tests/openapi_client/docs/ValidationErrorLocInner.md
index 04e49df..0bae52d 100644
--- a/pkgs/clan-cli/tests/openapi_client/docs/ValidationErrorLocInner.md
+++ b/pkgs/clan-cli/tests/openapi_client/docs/ValidationErrorLocInner.md
@@ -1,9 +1,9 @@
# ValidationErrorLocInner
-## Properties
-| Name | Type | Description | Notes |
-| ---- | ---- | ----------- | ----- |
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
## Example
@@ -22,5 +22,6 @@ validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict()
# create an instance of ValidationErrorLocInner from a dict
validation_error_loc_inner_form_dict = validation_error_loc_inner.from_dict(validation_error_loc_inner_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)
+
+
diff --git a/pkgs/clan-cli/tests/openapi_client/models/service.py b/pkgs/clan-cli/tests/openapi_client/models/service.py
index 18fab79..3a89a17 100644
--- a/pkgs/clan-cli/tests/openapi_client/models/service.py
+++ b/pkgs/clan-cli/tests/openapi_client/models/service.py
@@ -30,11 +30,12 @@ class Service(BaseModel):
service_name: StrictStr = Field(...)
service_type: StrictStr = Field(...)
endpoint_url: StrictStr = Field(...)
- status: StrictStr = Field(...)
other: Dict[str, Any] = Field(...)
entity_did: StrictStr = Field(...)
+ status: Dict[str, Any] = Field(...)
+ action: Dict[str, Any] = Field(...)
usage: conlist(ServiceUsage) = Field(...)
- __properties = ["uuid", "service_name", "service_type", "endpoint_url", "status", "other", "entity_did", "usage"]
+ __properties = ["uuid", "service_name", "service_type", "endpoint_url", "other", "entity_did", "status", "action", "usage"]
class Config:
"""Pydantic configuration"""
@@ -83,9 +84,10 @@ class Service(BaseModel):
"service_name": obj.get("service_name"),
"service_type": obj.get("service_type"),
"endpoint_url": obj.get("endpoint_url"),
- "status": obj.get("status"),
"other": obj.get("other"),
"entity_did": obj.get("entity_did"),
+ "status": obj.get("status"),
+ "action": obj.get("action"),
"usage": [ServiceUsage.from_dict(_item) for _item in obj.get("usage")] if obj.get("usage") is not None else None
})
return _obj
diff --git a/pkgs/clan-cli/tests/openapi_client/models/service_create.py b/pkgs/clan-cli/tests/openapi_client/models/service_create.py
index 1bd4162..a50bd0e 100644
--- a/pkgs/clan-cli/tests/openapi_client/models/service_create.py
+++ b/pkgs/clan-cli/tests/openapi_client/models/service_create.py
@@ -30,11 +30,12 @@ class ServiceCreate(BaseModel):
service_name: StrictStr = Field(...)
service_type: StrictStr = Field(...)
endpoint_url: StrictStr = Field(...)
- status: StrictStr = Field(...)
other: Dict[str, Any] = Field(...)
entity_did: StrictStr = Field(...)
+ status: Dict[str, Any] = Field(...)
+ action: Dict[str, Any] = Field(...)
usage: conlist(ServiceUsageCreate) = Field(...)
- __properties = ["uuid", "service_name", "service_type", "endpoint_url", "status", "other", "entity_did", "usage"]
+ __properties = ["uuid", "service_name", "service_type", "endpoint_url", "other", "entity_did", "status", "action", "usage"]
class Config:
"""Pydantic configuration"""
@@ -83,9 +84,10 @@ class ServiceCreate(BaseModel):
"service_name": obj.get("service_name"),
"service_type": obj.get("service_type"),
"endpoint_url": obj.get("endpoint_url"),
- "status": obj.get("status"),
"other": obj.get("other"),
"entity_did": obj.get("entity_did"),
+ "status": obj.get("status"),
+ "action": obj.get("action"),
"usage": [ServiceUsageCreate.from_dict(_item) for _item in obj.get("usage")] if obj.get("usage") is not None else None
})
return _obj
diff --git a/pkgs/clan-cli/tests/test_db_api.py b/pkgs/clan-cli/tests/test_db_api.py
index 390c4e2..f17d7bd 100644
--- a/pkgs/clan-cli/tests/test_db_api.py
+++ b/pkgs/clan-cli/tests/test_db_api.py
@@ -26,7 +26,7 @@ random.seed(42)
host = config.host
port_dlg = config.port_dlg
port_ap = config.port_ap
-port_client_base = config.port_client_base
+port_client_base = config._port_client_base
num_uuids = 100
uuids = [str(uuid.UUID(int=random.getrandbits(128))) for i in range(num_uuids)]
@@ -38,7 +38,7 @@ def test_health(api_client: ApiClient) -> None:
assert res.status == Status.ONLINE
-def create_entities(num: int = 10, role: str = "entity") -> list[EntityCreate]:
+def create_entities(num: int = 5, role: str = "entity") -> list[EntityCreate]:
res = []
for i in range(num):
en = EntityCreate(
@@ -80,8 +80,14 @@ def create_service(idx: int, entity: Entity) -> ServiceCreate:
service_name=f"Carlos Printing{idx}",
service_type="3D Printing",
endpoint_url=f"{entity.ip}/v1/print_daemon{idx}",
- status="unknown",
- other={"action": ["register", "deregister", "delete", "create"]},
+ status={"data": ["draft", "registered"]},
+ other={},
+ action={
+ "data": [
+ {"name": "register", "path": "/register"},
+ {"name": "deregister", "path": "/deregister"},
+ ]
+ },
entity_did=entity.did,
usage=[],
)
@@ -102,10 +108,9 @@ def test_create_services(api_client: ApiClient) -> None:
sapi = ServicesApi(api_client=api_client)
eapi = EntitiesApi(api_client=api_client)
for midx, entity in enumerate(eapi.get_all_entities()):
- for idx in range(4):
- service_obj = create_service(idx + 4 * midx, entity)
- service = sapi.create_service(service_obj)
- assert service.uuid == service_obj.uuid
+ service_obj = create_service(midx, entity)
+ service = sapi.create_service(service_obj)
+ assert service.uuid == service_obj.uuid
random.seed(77)
diff --git a/pkgs/ui/src/components/sidebar/index.tsx b/pkgs/ui/src/components/sidebar/index.tsx
index b56c213..c2519ff 100644
--- a/pkgs/ui/src/components/sidebar/index.tsx
+++ b/pkgs/ui/src/components/sidebar/index.tsx
@@ -45,6 +45,18 @@ const menuEntityEntries: MenuEntry[] = [
to: "/client/C2",
disabled: false,
},
+ {
+ icon: ,
+ label: "C3",
+ to: "/client/C3",
+ disabled: false,
+ },
+ {
+ icon: ,
+ label: "C4",
+ to: "/client/C4",
+ disabled: false,
+ },
];
const menuEntries: MenuEntry[] = [