From d56bad265fd934bfd727d5835d681ac1b4dafb8b Mon Sep 17 00:00:00 2001 From: Georg-Stahn Date: Wed, 10 Jan 2024 17:44:02 +0100 Subject: [PATCH 1/5] draft emulating flag --- pkgs/clan-cli/clan_cli/webui/schemas.py | 10 + pkgs/clan-cli/clan_cli/webui/server.py | 21 ++ pkgs/clan-cli/clan_cli/webui/sql_models.py | 7 +- pkgs/clan-cli/tests/api.py | 104 +++++++- pkgs/clan-cli/tests/emulate_fastapi.py | 61 ++++- .../clan-cli/tests/openapi_client/__init__.py | 1 + .../tests/openapi_client/docs/DefaultApi.md | 68 ++--- .../tests/openapi_client/docs/EntitiesApi.md | 240 +++++++++--------- .../tests/openapi_client/docs/Entity.md | 25 +- .../tests/openapi_client/docs/EntityCreate.md | 21 +- .../tests/openapi_client/docs/Eventmessage.md | 25 +- .../openapi_client/docs/EventmessageCreate.md | 25 +- .../openapi_client/docs/EventmessagesApi.md | 60 ++--- .../docs/HTTPValidationError.md | 11 +- .../tests/openapi_client/docs/Machine.md | 13 +- .../openapi_client/docs/RepositoriesApi.md | 34 +-- .../tests/openapi_client/docs/Resolution.md | 21 +- .../openapi_client/docs/ResolutionApi.md | 34 +-- .../tests/openapi_client/docs/Service.md | 25 +- .../openapi_client/docs/ServiceCreate.md | 23 +- .../tests/openapi_client/docs/ServicesApi.md | 140 +++++----- .../tests/openapi_client/docs/Status.md | 7 +- .../openapi_client/docs/ValidationError.md | 15 +- .../docs/ValidationErrorLocInner.md | 9 +- .../tests/openapi_client/models/__init__.py | 1 + .../tests/openapi_client/models/entity.py | 7 +- .../openapi_client/models/entity_create.py | 7 +- .../openapi_client/test/test_eventmessage.py | 67 ----- .../test/test_eventmessage_create.py | 67 ----- .../test/test_eventmessages_api.py | 45 ---- pkgs/clan-cli/tests/test_db_api.py | 33 ++- 31 files changed, 648 insertions(+), 579 deletions(-) delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_eventmessage.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_eventmessage_create.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_eventmessages_api.py diff --git a/pkgs/clan-cli/clan_cli/webui/schemas.py b/pkgs/clan-cli/clan_cli/webui/schemas.py index b3175f0..ea2e3e3 100644 --- a/pkgs/clan-cli/clan_cli/webui/schemas.py +++ b/pkgs/clan-cli/clan_cli/webui/schemas.py @@ -11,6 +11,12 @@ class Status(Enum): UNKNOWN = "unknown" +class Roles(Enum): + PROSUMER = "service_prosumer" + AP = "AP" + DLG = "DLG" + + class Machine(BaseModel): name: str status: Status @@ -25,6 +31,10 @@ class EntityBase(BaseModel): did: str = Field(..., example="did:sov:test:1234") name: str = Field(..., example="C1") ip: str = Field(..., example="127.0.0.1") + network: str = Field(..., example="255.255.0.0") + role: Roles = Field( + ..., example=Roles("service_prosumer") + ) # roles are needed for UI to show the correct view visible: bool = Field(..., example=True) other: dict = Field( ..., diff --git a/pkgs/clan-cli/clan_cli/webui/server.py b/pkgs/clan-cli/clan_cli/webui/server.py index b1ad401..5d0f388 100644 --- a/pkgs/clan-cli/clan_cli/webui/server.py +++ b/pkgs/clan-cli/clan_cli/webui/server.py @@ -126,6 +126,27 @@ def start_server(args: argparse.Namespace) -> None: cmd = ["pytest", "-s", str(test_db_api)] subprocess.run(cmd, check=True) + if args.emulate: + # todo move emu + from .emulate_fastapi import (app_dlg, app_ap, app_c1, app_c2) + from .api import (get_health, port_dlg, port_ap, port_client_base) + import multiprocessing as mp + port = port_dlg + host = host + # server + proc = mp.Process( + target=uvicorn.run, + args=(app_dlg,), + kwargs={"host": host, "port": port, "log_level": "info"}, + daemon=True, + ) + proc.start() + + url = f"http://{host}:{port}" + res = get_health(url=url + "/health") + if res is None: + raise Exception(f"Couldn't reach {url} after starting server") + uvicorn.run( "clan_cli.webui.app:app", host=args.host, diff --git a/pkgs/clan-cli/clan_cli/webui/sql_models.py b/pkgs/clan-cli/clan_cli/webui/sql_models.py index 742b237..9b8bb29 100644 --- a/pkgs/clan-cli/clan_cli/webui/sql_models.py +++ b/pkgs/clan-cli/clan_cli/webui/sql_models.py @@ -1,6 +1,7 @@ -from sqlalchemy import JSON, Boolean, Column, ForeignKey, Integer, String, Text +from sqlalchemy import JSON, Boolean, Column, ForeignKey, Integer, String, Text, Enum from sqlalchemy.orm import relationship +from .schemas import Roles from .sql_db import Base # Relationsship example @@ -14,12 +15,14 @@ class Entity(Base): did = Column(String, primary_key=True, index=True) name = Column(String, index=True, unique=True) ip = Column(String, index=True) + network = Column(String, index=True) + role = Column(Enum(Roles), index=True) attached = Column(Boolean, index=True) visible = Column(Boolean, index=True) stop_health_task = Column(Boolean) ## Non queryable body ## - # In here we deposit: Network, Roles, Visible, etc. + # In here we deposit: Not yet defined stuff other = Column(JSON) ## Relations ## diff --git a/pkgs/clan-cli/tests/api.py b/pkgs/clan-cli/tests/api.py index 1c3644d..8e4c784 100644 --- a/pkgs/clan-cli/tests/api.py +++ b/pkgs/clan-cli/tests/api.py @@ -13,6 +13,15 @@ from ports import PortFunction from clan_cli.webui.app import app +import emulate_fastapi + + +# TODO config file +#is linked to the emulate_fastapi.py and api.py +host = "127.0.0.1" +port_dlg = 6000 +port_ap = 6600 +port_client_base = 7000 @pytest.fixture(scope="session") def test_client() -> TestClient: @@ -31,10 +40,11 @@ def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | # Pytest fixture to run the server in a separate process +# server @pytest.fixture(scope="session") def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: port = unused_tcp_port() - host = "127.0.0.1" + host = host proc = Process( target=uvicorn.run, args=(app,), @@ -51,6 +61,98 @@ def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: yield url proc.terminate() +# Pytest fixture to run the server in a separate process +# emulating c1 +@pytest.fixture(scope="session") +def server_c1() -> Generator[str, None, None]: + port = port_client_base + host = host + # server + proc = Process( + target=uvicorn.run, + args=(app,), + kwargs={"host": host, "port": port, "log_level": "info"}, + daemon=True, + ) + proc.start() + + url = f"http://{host}:{port}" + res = get_health(url=url + "/health") + if res is None: + raise Exception(f"Couldn't reach {url} after starting server") + + yield url + proc.terminate() + +# Pytest fixture to run the server in a separate process +# emulating c2 +@pytest.fixture(scope="session") +def server_c2() -> Generator[str, None, None]: + port = port_client_base+1 + host = host + # server + proc = Process( + target=uvicorn.run, + args=(app,), + kwargs={"host": host, "port": port, "log_level": "info"}, + daemon=True, + ) + proc.start() + + url = f"http://{host}:{port}" + res = get_health(url=url + "/health") + if res is None: + raise Exception(f"Couldn't reach {url} after starting server") + + yield url + proc.terminate() + proc.terminate() + +# Pytest fixture to run the server in a separate process +# emulating ap +@pytest.fixture(scope="session") +def server_ap() -> Generator[str, None, None]: + port = port_ap + host = host + # server + proc = Process( + target=uvicorn.run, + args=(app,), + kwargs={"host": host, "port": port, "log_level": "info"}, + daemon=True, + ) + proc.start() + + url = f"http://{host}:{port}" + res = get_health(url=url + "/health") + if res is None: + raise Exception(f"Couldn't reach {url} after starting server") + + yield url + proc.terminate() + +# Pytest fixture to run the server in a separate process +# emulating dlg +@pytest.fixture(scope="session") +def server_dlg() -> Generator[str, None, None]: + port = port_dlg + host = host + # server + proc = Process( + target=uvicorn.run, + args=(app,), + kwargs={"host": host, "port": port, "log_level": "info"}, + daemon=True, + ) + proc.start() + + url = f"http://{host}:{port}" + res = get_health(url=url + "/health") + if res is None: + raise Exception(f"Couldn't reach {url} after starting server") + + yield url + proc.terminate() @pytest.fixture(scope="session") def api_client(server_url: str) -> Generator[ApiClient, None, None]: diff --git a/pkgs/clan-cli/tests/emulate_fastapi.py b/pkgs/clan-cli/tests/emulate_fastapi.py index 1033a81..c131f54 100644 --- a/pkgs/clan-cli/tests/emulate_fastapi.py +++ b/pkgs/clan-cli/tests/emulate_fastapi.py @@ -1,20 +1,61 @@ +import sys import time - +import urllib import uvicorn from fastapi import FastAPI from fastapi.responses import HTMLResponse +import test_db_api -app = FastAPI() +app_dlg = FastAPI() +app_ap = FastAPI() +app_c1 = FastAPI() +app_c2 = FastAPI() # bash tests: curl localhost:8000/ap_list_of_services -@app.get("/health") +#### HEALTH + +@app_c1.get("/health") +async def healthcheck() -> str: + return "200 OK" +@app_c2.get("/health") +async def healthcheck() -> str: + return "200 OK" +@app_dlg.get("/health") +async def healthcheck() -> str: + return "200 OK" +@app_ap.get("/health") async def healthcheck() -> str: return "200 OK" +def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | None: + for attempt in range(max_retries): + try: + with urllib.request.urlopen(url) as response: + return response.read() + except urllib.URLError as e: + print(f"Attempt {attempt + 1} failed: {e.reason}", file=sys.stderr) + time.sleep(delay) + return None -@app.get("/consume_service_from_other_entity", response_class=HTMLResponse) + +#### CONSUME SERVICE + +# TODO send_msg??? + +@app_c1.get("/consume_service_from_other_entity", response_class=HTMLResponse) +async def consume_service_from_other_entity() -> HTMLResponse: + html_content = """ + + +
+ + + """ + time.sleep(3) + return HTMLResponse(content=html_content, status_code=200) +@app_c2.get("/consume_service_from_other_entity", response_class=HTMLResponse) async def consume_service_from_other_entity() -> HTMLResponse: html_content = """ @@ -27,7 +68,9 @@ async def consume_service_from_other_entity() -> HTMLResponse: return HTMLResponse(content=html_content, status_code=200) -@app.get("/ap_list_of_services", response_class=HTMLResponse) +#### ap_list_of_services + +@app_ap.get("/ap_list_of_services", response_class=HTMLResponse) async def ap_list_of_services() -> HTMLResponse: html_content = b"""HTTP/1.1 200 OK\r\n\r\n[[ { @@ -114,7 +157,7 @@ async def ap_list_of_services() -> HTMLResponse: return HTMLResponse(content=html_content, status_code=200) -@app.get("/dlg_list_of_did_resolutions", response_class=HTMLResponse) +@app_dlg.get("/dlg_list_of_did_resolutions", response_class=HTMLResponse) async def dlg_list_of_did_resolutions() -> HTMLResponse: html_content = b"""HTTP/1.1 200 OK\r\n\r\n [ @@ -149,5 +192,7 @@ async def dlg_list_of_did_resolutions() -> HTMLResponse: ]""" return HTMLResponse(content=html_content, status_code=200) - -uvicorn.run(app, host="localhost", port=8000) +uvicorn.run(app_dlg, host=f"{test_db_api.host}", port=test_db_api.port_dlg) +uvicorn.run(app_ap, host=f"{test_db_api.host}", port=test_db_api.port_dlg) +uvicorn.run(app_c1, host=f"{test_db_api.host}", port=test_db_api.port_client_base) +uvicorn.run(app_c2, host=f"{test_db_api.host}", port=test_db_api.port_client_base+1) diff --git a/pkgs/clan-cli/tests/openapi_client/__init__.py b/pkgs/clan-cli/tests/openapi_client/__init__.py index c30337b..b3656f9 100644 --- a/pkgs/clan-cli/tests/openapi_client/__init__.py +++ b/pkgs/clan-cli/tests/openapi_client/__init__.py @@ -43,6 +43,7 @@ from openapi_client.models.eventmessage_create import EventmessageCreate from openapi_client.models.http_validation_error import HTTPValidationError from openapi_client.models.machine import Machine from openapi_client.models.resolution import Resolution +from openapi_client.models.roles import Roles from openapi_client.models.service import Service from openapi_client.models.service_create import ServiceCreate from openapi_client.models.status import Status diff --git a/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md b/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md index aef64f7..9a4a45c 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md @@ -1,15 +1,15 @@ # 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 +[**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 | -| [**health**](DefaultApi.md#health) | **GET** /health | Health | -| [**root**](DefaultApi.md#root) | **GET** /{path_name} | Root | # **get** - > get() Get @@ -42,8 +42,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 @@ -56,19 +57,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) # **health** - > Machine health() Health @@ -104,8 +103,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 @@ -118,19 +118,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 @@ -155,7 +153,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 @@ -164,11 +162,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 @@ -180,14 +180,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 dc621f8..4a99b6c 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) | **POST** /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) | **POST** /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_name**](EntitiesApi.md#get_entity_by_name) | **GET** /api/v1/entity_by_name | Get Entity By Name +[**is_attached**](EntitiesApi.md#is_attached) | **GET** /api/v1/is_attached | Is Attached -| Method | HTTP request | Description | -| ----------------------------------------------------------------- | --------------------------------- | --------------------- | -| [**attach_entity**](EntitiesApi.md#attach_entity) | **POST** /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) | **POST** /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_name**](EntitiesApi.md#get_entity_by_name) | **GET** /api/v1/entity_by_name | Get Entity By Name | -| [**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:1234'] | -| **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:1234'] + **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:1234'] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity_did** | **str**| | [optional] [default to 'did:sov:test:1234'] ### 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:1234'] | -| **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:1234'] + **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:1234'] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity_did** | **str**| | [optional] [default to 'did:sov:test:1234'] ### 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_name** - > Entity get_entity_by_name(entity_name) Get Entity By Name @@ -513,7 +513,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_name = 'entity_name_example' # str | + entity_name = 'entity_name_example' # str | try: # Get Entity By Name @@ -524,11 +524,13 @@ with openapi_client.ApiClient(configuration) as api_client: print("Exception when calling EntitiesApi->get_entity_by_name: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| --------------- | ------- | ----------- | ----- | -| **entity_name** | **str** | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity_name** | **str**| | ### Return type @@ -540,20 +542,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 @@ -589,11 +589,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:1234'] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity_did** | **str**| | [optional] [default to 'did:sov:test:1234'] ### Return type @@ -605,14 +607,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 fa7efb2..4818b3b 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md @@ -1,16 +1,18 @@ # Entity -## Properties -| Name | Type | Description | Notes | -| -------------------- | ---------- | ----------- | ----- | -| **did** | **str** | | -| **name** | **str** | | -| **ip** | **str** | | -| **visible** | **bool** | | -| **other** | **object** | | -| **attached** | **bool** | | -| **stop_health_task** | **bool** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**did** | **str** | | +**name** | **str** | | +**ip** | **str** | | +**network** | **str** | | +**role** | [**Roles**](Roles.md) | | +**visible** | **bool** | | +**other** | **object** | | +**attached** | **bool** | | +**stop_health_task** | **bool** | | ## Example @@ -29,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 4fff16a..306e4c0 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md @@ -1,14 +1,16 @@ # EntityCreate -## Properties -| Name | Type | Description | Notes | -| ----------- | ---------- | ----------- | ----- | -| **did** | **str** | | -| **name** | **str** | | -| **ip** | **str** | | -| **visible** | **bool** | | -| **other** | **object** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**did** | **str** | | +**name** | **str** | | +**ip** | **str** | | +**network** | **str** | | +**role** | [**Roles**](Roles.md) | | +**visible** | **bool** | | +**other** | **object** | | ## Example @@ -27,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 cbe65cb..e51e987 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 | -| ------------- | ---------- | ----------- | ----- | -| **id** | **int** | | -| **timestamp** | **int** | | -| **group** | **int** | | -| **group_id** | **int** | | -| **msg_type** | **int** | | -| **src_did** | **str** | | -| **des_did** | **str** | | -| **msg** | **object** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**timestamp** | **int** | | +**group** | **int** | | +**group_id** | **int** | | +**msg_type** | **int** | | +**src_did** | **str** | | +**des_did** | **str** | | +**msg** | **object** | | ## 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 eb6f16d..bfb7347 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md @@ -1,17 +1,17 @@ # EventmessageCreate -## Properties -| Name | Type | Description | Notes | -| ------------- | ---------- | ----------- | ----- | -| **id** | **int** | | -| **timestamp** | **int** | | -| **group** | **int** | | -| **group_id** | **int** | | -| **msg_type** | **int** | | -| **src_did** | **str** | | -| **des_did** | **str** | | -| **msg** | **object** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**timestamp** | **int** | | +**group** | **int** | | +**group_id** | **int** | | +**msg_type** | **int** | | +**src_did** | **str** | | +**des_did** | **str** | | +**msg** | **object** | | ## Example @@ -30,5 +30,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 d6affb9..e146d13 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/send_msg | 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/send_msg | 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 27928d5..27a3992 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md @@ -1,15 +1,15 @@ # Resolution -## Properties -| Name | Type | Description | Notes | -| ------------------ | ------------ | ----------- | ----- | -| **requester_name** | **str** | | -| **requester_did** | **str** | | -| **resolved_did** | **str** | | -| **other** | **object** | | -| **timestamp** | **datetime** | | -| **id** | **int** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**requester_name** | **str** | | +**requester_did** | **str** | | +**resolved_did** | **str** | | +**other** | **object** | | +**timestamp** | **datetime** | | +**id** | **int** | | ## Example @@ -28,5 +28,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/Service.md b/pkgs/clan-cli/tests/openapi_client/docs/Service.md index 5798f74..bff9e15 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Service.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Service.md @@ -1,17 +1,17 @@ # Service -## Properties -| Name | Type | Description | Notes | -| ---------------- | ----------------------- | ----------- | ----- | -| **uuid** | **str** | | -| **service_name** | **str** | | -| **service_type** | **str** | | -| **endpoint_url** | **str** | | -| **status** | **str** | | -| **other** | **object** | | -| **entity_did** | **str** | | -| **entity** | [**Entity**](Entity.md) | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | +**service_name** | **str** | | +**service_type** | **str** | | +**endpoint_url** | **str** | | +**status** | **str** | | +**other** | **object** | | +**entity_did** | **str** | | +**entity** | [**Entity**](Entity.md) | | ## Example @@ -30,5 +30,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 7843b1a..f8e84e1 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md @@ -1,16 +1,16 @@ # ServiceCreate -## Properties -| Name | Type | Description | Notes | -| ---------------- | ---------- | ----------- | ----- | -| **uuid** | **str** | | -| **service_name** | **str** | | -| **service_type** | **str** | | -| **endpoint_url** | **str** | | -| **status** | **str** | | -| **other** | **object** | | -| **entity_did** | **str** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **str** | | +**service_name** | **str** | | +**service_type** | **str** | | +**endpoint_url** | **str** | | +**status** | **str** | | +**other** | **object** | | +**entity_did** | **str** | | ## Example @@ -29,5 +29,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/ServicesApi.md b/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md index 006615a..9a2c544 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md @@ -1,17 +1,17 @@ # openapi_client.ServicesApi -All URIs are relative to _http://localhost_ +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**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 -| Method | HTTP request | Description | -| ----------------------------------------------------------------------------- | --------------------------------------- | --------------------------- | -| [**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 | # **create_service** - > Service create_service(service_create) Create Service @@ -38,7 +38,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 @@ -49,11 +49,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 @@ -65,20 +67,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 @@ -114,11 +114,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:1234'] | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity_did** | **str**| | [optional] [default to 'did:sov:test:1234'] ### Return type @@ -130,20 +132,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 @@ -181,12 +181,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 @@ -198,20 +200,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 @@ -250,13 +250,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:1234'] | -| **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:1234'] + **skip** | **int**| | [optional] [default to 0] + **limit** | **int**| | [optional] [default to 100] ### Return type @@ -268,20 +270,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_services_without_entity** - > List[Service] get_services_without_entity(entity_did=entity_did, skip=skip, limit=limit) Get Services Without Entity @@ -320,13 +320,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:1234'] | -| **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:1234'] + **skip** | **int**| | [optional] [default to 0] + **limit** | **int**| | [optional] [default to 100] ### Return type @@ -338,14 +340,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/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/__init__.py b/pkgs/clan-cli/tests/openapi_client/models/__init__.py index 4460d22..f28cdd8 100644 --- a/pkgs/clan-cli/tests/openapi_client/models/__init__.py +++ b/pkgs/clan-cli/tests/openapi_client/models/__init__.py @@ -21,6 +21,7 @@ from openapi_client.models.eventmessage_create import EventmessageCreate from openapi_client.models.http_validation_error import HTTPValidationError from openapi_client.models.machine import Machine from openapi_client.models.resolution import Resolution +from openapi_client.models.roles import Roles from openapi_client.models.service import Service from openapi_client.models.service_create import ServiceCreate from openapi_client.models.status import Status diff --git a/pkgs/clan-cli/tests/openapi_client/models/entity.py b/pkgs/clan-cli/tests/openapi_client/models/entity.py index 0ff4d16..a78e778 100644 --- a/pkgs/clan-cli/tests/openapi_client/models/entity.py +++ b/pkgs/clan-cli/tests/openapi_client/models/entity.py @@ -20,6 +20,7 @@ import json from typing import Any, Dict from pydantic import BaseModel, Field, StrictBool, StrictStr +from openapi_client.models.roles import Roles class Entity(BaseModel): """ @@ -28,11 +29,13 @@ class Entity(BaseModel): did: StrictStr = Field(...) name: StrictStr = Field(...) ip: StrictStr = Field(...) + network: StrictStr = Field(...) + role: Roles = Field(...) visible: StrictBool = Field(...) other: Dict[str, Any] = Field(...) attached: StrictBool = Field(...) stop_health_task: StrictBool = Field(...) - __properties = ["did", "name", "ip", "visible", "other", "attached", "stop_health_task"] + __properties = ["did", "name", "ip", "network", "role", "visible", "other", "attached", "stop_health_task"] class Config: """Pydantic configuration""" @@ -73,6 +76,8 @@ class Entity(BaseModel): "did": obj.get("did"), "name": obj.get("name"), "ip": obj.get("ip"), + "network": obj.get("network"), + "role": obj.get("role"), "visible": obj.get("visible"), "other": obj.get("other"), "attached": obj.get("attached"), diff --git a/pkgs/clan-cli/tests/openapi_client/models/entity_create.py b/pkgs/clan-cli/tests/openapi_client/models/entity_create.py index f9df72b..d7385e1 100644 --- a/pkgs/clan-cli/tests/openapi_client/models/entity_create.py +++ b/pkgs/clan-cli/tests/openapi_client/models/entity_create.py @@ -20,6 +20,7 @@ import json from typing import Any, Dict from pydantic import BaseModel, Field, StrictBool, StrictStr +from openapi_client.models.roles import Roles class EntityCreate(BaseModel): """ @@ -28,9 +29,11 @@ class EntityCreate(BaseModel): did: StrictStr = Field(...) name: StrictStr = Field(...) ip: StrictStr = Field(...) + network: StrictStr = Field(...) + role: Roles = Field(...) visible: StrictBool = Field(...) other: Dict[str, Any] = Field(...) - __properties = ["did", "name", "ip", "visible", "other"] + __properties = ["did", "name", "ip", "network", "role", "visible", "other"] class Config: """Pydantic configuration""" @@ -71,6 +74,8 @@ class EntityCreate(BaseModel): "did": obj.get("did"), "name": obj.get("name"), "ip": obj.get("ip"), + "network": obj.get("network"), + "role": obj.get("role"), "visible": obj.get("visible"), "other": obj.get("other") }) diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_eventmessage.py b/pkgs/clan-cli/tests/openapi_client/test/test_eventmessage.py deleted file mode 100644 index 21852d5..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_eventmessage.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from openapi_client.models.eventmessage import Eventmessage # noqa: E501 - -class TestEventmessage(unittest.TestCase): - """Eventmessage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Eventmessage: - """Test Eventmessage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Eventmessage` - """ - model = Eventmessage() # noqa: E501 - if include_optional: - return Eventmessage( - id = 123456, - timestamp = 1234123413, - group = 1, - group_id = 12345, - msg_type = 1, - src_did = 'did:sov:test:2234', - des_did = 'did:sov:test:1234', - msg = {optinal=values} - ) - else: - return Eventmessage( - id = 123456, - timestamp = 1234123413, - group = 1, - group_id = 12345, - msg_type = 1, - src_did = 'did:sov:test:2234', - des_did = 'did:sov:test:1234', - msg = {optinal=values}, - ) - """ - - def testEventmessage(self): - """Test Eventmessage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_eventmessage_create.py b/pkgs/clan-cli/tests/openapi_client/test/test_eventmessage_create.py deleted file mode 100644 index 8bc282d..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_eventmessage_create.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from openapi_client.models.eventmessage_create import EventmessageCreate # noqa: E501 - -class TestEventmessageCreate(unittest.TestCase): - """EventmessageCreate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EventmessageCreate: - """Test EventmessageCreate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EventmessageCreate` - """ - model = EventmessageCreate() # noqa: E501 - if include_optional: - return EventmessageCreate( - id = 123456, - timestamp = 1234123413, - group = 1, - group_id = 12345, - msg_type = 1, - src_did = 'did:sov:test:2234', - des_did = 'did:sov:test:1234', - msg = {optinal=values} - ) - else: - return EventmessageCreate( - id = 123456, - timestamp = 1234123413, - group = 1, - group_id = 12345, - msg_type = 1, - src_did = 'did:sov:test:2234', - des_did = 'did:sov:test:1234', - msg = {optinal=values}, - ) - """ - - def testEventmessageCreate(self): - """Test EventmessageCreate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_eventmessages_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_eventmessages_api.py deleted file mode 100644 index e2841ab..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_eventmessages_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - FastAPI - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 0.1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from openapi_client.api.eventmessages_api import EventmessagesApi # noqa: E501 - - -class TestEventmessagesApi(unittest.TestCase): - """EventmessagesApi unit test stubs""" - - def setUp(self) -> None: - self.api = EventmessagesApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_create_eventmessage(self) -> None: - """Test case for create_eventmessage - - Create Eventmessage # noqa: E501 - """ - pass - - def test_get_all_eventmessages(self) -> None: - """Test case for get_all_eventmessages - - Get All Eventmessages # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/test_db_api.py b/pkgs/clan-cli/tests/test_db_api.py index b619729..2248503 100644 --- a/pkgs/clan-cli/tests/test_db_api.py +++ b/pkgs/clan-cli/tests/test_db_api.py @@ -1,6 +1,7 @@ import random import time import uuid +import api from openapi_client import ApiClient from openapi_client.api import DefaultApi @@ -15,10 +16,16 @@ from openapi_client.models import ( Machine, ServiceCreate, Status, + Roles, ) random.seed(42) +#is linked to the emulate_fastapi.py and api.py +host = api.host +port_dlg = api.port_dlg +port_ap = api.port_ap +port_client_base = api.port_client_base num_uuids = 100 uuids = [str(uuid.UUID(int=random.getrandbits(128))) for i in range(num_uuids)] @@ -36,11 +43,33 @@ def create_entities(num: int = 10) -> list[EntityCreate]: en = EntityCreate( did=f"did:sov:test:12{i}", name=f"C{i}", - ip=f"127.0.0.1:{7000+i}", + ip=f"{host}:{port_client_base+i}", + network=f"255.255.0.0", + role=Roles("service_prosumer"), visible=True, other={}, ) res.append(en) + dlg = EntityCreate( + did=f"did:sov:test:{port_dlg}", + name=f"DLG", + ip=f"{host}:{port_dlg}/health", + network=f"255.255.0.0", + role=Roles("DLG"), + visible=True, + other={}, + ) + res.append(dlg) + ap = EntityCreate( + did=f"did:sov:test:{port_ap}", + name=f"AP", + ip=f"{host}:{port_ap}/health", + network=f"255.255.0.0", + role=Roles("AP"), + visible=True, + other={}, + ) + res.append(ap) return res @@ -139,4 +168,4 @@ def test_create_eventmessages(api_client: ApiClient) -> None: res: Eventmessage = api.create_eventmessage(own_eventmsg) # breakpoint() assert res.id == own_eventmsg.id - assert [] != api.get_all_eventmessages() + assert [] != api.get_all_eventmessages() \ No newline at end of file -- 2.51.0 From b6793826229eada8f6f01e888ab792d37e469282 Mon Sep 17 00:00:00 2001 From: Georg-Stahn Date: Wed, 10 Jan 2024 19:32:07 +0100 Subject: [PATCH 2/5] draft2 emulating flag config added --- pkgs/clan-cli/tests/api.py | 10 +- pkgs/clan-cli/tests/emulate_fastapi.py | 198 ------------------------- 2 files changed, 2 insertions(+), 206 deletions(-) delete mode 100644 pkgs/clan-cli/tests/emulate_fastapi.py diff --git a/pkgs/clan-cli/tests/api.py b/pkgs/clan-cli/tests/api.py index 8e4c784..d538f42 100644 --- a/pkgs/clan-cli/tests/api.py +++ b/pkgs/clan-cli/tests/api.py @@ -14,15 +14,9 @@ from ports import PortFunction from clan_cli.webui.app import app import emulate_fastapi +import config -# TODO config file -#is linked to the emulate_fastapi.py and api.py -host = "127.0.0.1" -port_dlg = 6000 -port_ap = 6600 -port_client_base = 7000 - @pytest.fixture(scope="session") def test_client() -> TestClient: return TestClient(app) @@ -44,7 +38,7 @@ def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | @pytest.fixture(scope="session") def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: port = unused_tcp_port() - host = host + host = config.host proc = Process( target=uvicorn.run, args=(app,), diff --git a/pkgs/clan-cli/tests/emulate_fastapi.py b/pkgs/clan-cli/tests/emulate_fastapi.py deleted file mode 100644 index c131f54..0000000 --- a/pkgs/clan-cli/tests/emulate_fastapi.py +++ /dev/null @@ -1,198 +0,0 @@ -import sys -import time -import urllib -import uvicorn -from fastapi import FastAPI -from fastapi.responses import HTMLResponse -import test_db_api - -app_dlg = FastAPI() -app_ap = FastAPI() -app_c1 = FastAPI() -app_c2 = FastAPI() - -# bash tests: curl localhost:8000/ap_list_of_services - - -#### HEALTH - -@app_c1.get("/health") -async def healthcheck() -> str: - return "200 OK" -@app_c2.get("/health") -async def healthcheck() -> str: - return "200 OK" -@app_dlg.get("/health") -async def healthcheck() -> str: - return "200 OK" -@app_ap.get("/health") -async def healthcheck() -> str: - return "200 OK" - -def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | None: - for attempt in range(max_retries): - try: - with urllib.request.urlopen(url) as response: - return response.read() - except urllib.URLError as e: - print(f"Attempt {attempt + 1} failed: {e.reason}", file=sys.stderr) - time.sleep(delay) - return None - - -#### CONSUME SERVICE - -# TODO send_msg??? - -@app_c1.get("/consume_service_from_other_entity", response_class=HTMLResponse) -async def consume_service_from_other_entity() -> HTMLResponse: - html_content = """ - - -
- - - """ - time.sleep(3) - return HTMLResponse(content=html_content, status_code=200) -@app_c2.get("/consume_service_from_other_entity", response_class=HTMLResponse) -async def consume_service_from_other_entity() -> HTMLResponse: - html_content = """ - - -
- - - """ - time.sleep(3) - return HTMLResponse(content=html_content, status_code=200) - - -#### ap_list_of_services - -@app_ap.get("/ap_list_of_services", response_class=HTMLResponse) -async def ap_list_of_services() -> HTMLResponse: - html_content = b"""HTTP/1.1 200 OK\r\n\r\n[[ - { - "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30df", - "service_name": "Carlos Printing", - "service_type": "3D Printing", - "endpoint_url": "http://127.0.0.1:8000", - "status": "unknown", - "other": { - "action": [ - "register", - "deregister", - "delete", - "create" - ] - }, - "entity_did": "did:sov:test:1234" - }, - { - "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d1", - "service_name": "Luiss Fax", - "service_type": "Fax", - "endpoint_url": "http://127.0.0.1:8000", - "status": "unknown", - "other": { - "action": [ - "register", - "deregister", - "delete", - "create" - ] - }, - "entity_did": "did:sov:test:1235" - }, - { - "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d2", - "service_name": "Erdems VR-Stream", - "service_type": "VR-Stream", - "endpoint_url": "http://127.0.0.1:8000", - "status": "unknown", - "other": { - "action": [ - "register", - "deregister", - "delete", - "create" - ] - }, - "entity_did": "did:sov:test:1236" - }, - { - "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d3", - "service_name": "Onurs gallary", - "service_type": "gallary", - "endpoint_url": "http://127.0.0.1:8000", - "status": "unknown", - "other": { - "action": [ - "register", - "deregister", - "delete", - "create" - ] - }, - "entity_did": "did:sov:test:1237" - }, - { - "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d4", - "service_name": "Saras Game-Shop", - "service_type": "Game-Shop", - "endpoint_url": "http://127.0.0.1:8000", - "status": "unknown", - "other": { - "action": [ - "register", - "deregister", - "delete", - "create" - ] - }, - "entity_did": "did:sov:test:1238" - } -]]""" - return HTMLResponse(content=html_content, status_code=200) - - -@app_dlg.get("/dlg_list_of_did_resolutions", response_class=HTMLResponse) -async def dlg_list_of_did_resolutions() -> HTMLResponse: - html_content = b"""HTTP/1.1 200 OK\r\n\r\n -[ - { - "did": "did:sov:test:1234", - "name": "C1", - "ip": "127.0.0.1:5100", - "attached": false, - "visible": true, - "other": { - "network": "Carlo1's Home Network", - "roles": [ - "service repository", - "service consumer" - ] - } - }, - { - "did": "did:sov:test:1235", - "name": "C2", - "ip": "127.0.0.1:5100", - "attached": false, - "visible": true, - "other": { - "network": "Carlo2's Home Network", - "roles": [ - "service repository", - "service prosumer" - ] - } - } -]""" - return HTMLResponse(content=html_content, status_code=200) - -uvicorn.run(app_dlg, host=f"{test_db_api.host}", port=test_db_api.port_dlg) -uvicorn.run(app_ap, host=f"{test_db_api.host}", port=test_db_api.port_dlg) -uvicorn.run(app_c1, host=f"{test_db_api.host}", port=test_db_api.port_client_base) -uvicorn.run(app_c2, host=f"{test_db_api.host}", port=test_db_api.port_client_base+1) -- 2.51.0 From b01b01a9593ab50d4df419f45b909b19d32f950e Mon Sep 17 00:00:00 2001 From: Georg-Stahn Date: Thu, 11 Jan 2024 15:34:01 +0100 Subject: [PATCH 3/5] backend with --emulate flag --- pkgs/clan-cli/clan_cli/webui/__init__.py | 6 + pkgs/clan-cli/clan_cli/webui/server.py | 43 ++-- pkgs/clan-cli/clan_cli/webui/sql_models.py | 5 +- pkgs/clan-cli/config.py | 4 + pkgs/clan-cli/emulate_fastapi.py | 205 +++++++++++++++ pkgs/clan-cli/tests/api.py | 96 +------ .../tests/openapi_client/docs/DefaultApi.md | 68 ++--- .../tests/openapi_client/docs/EntitiesApi.md | 240 +++++++++--------- .../tests/openapi_client/docs/Entity.md | 27 +- .../tests/openapi_client/docs/EntityCreate.md | 23 +- .../tests/openapi_client/docs/Eventmessage.md | 25 +- .../openapi_client/docs/EventmessageCreate.md | 25 +- .../openapi_client/docs/EventmessagesApi.md | 60 +++-- .../docs/HTTPValidationError.md | 11 +- .../tests/openapi_client/docs/Machine.md | 13 +- .../openapi_client/docs/RepositoriesApi.md | 34 ++- .../tests/openapi_client/docs/Resolution.md | 21 +- .../openapi_client/docs/ResolutionApi.md | 34 ++- .../tests/openapi_client/docs/Roles.md | 10 + .../tests/openapi_client/docs/Service.md | 25 +- .../openapi_client/docs/ServiceCreate.md | 23 +- .../tests/openapi_client/docs/ServicesApi.md | 140 +++++----- .../tests/openapi_client/docs/Status.md | 7 +- .../openapi_client/docs/ValidationError.md | 15 +- .../docs/ValidationErrorLocInner.md | 9 +- .../tests/openapi_client/models/roles.py | 41 +++ pkgs/clan-cli/tests/test_db_api.py | 27 +- 27 files changed, 699 insertions(+), 538 deletions(-) create mode 100644 pkgs/clan-cli/config.py create mode 100644 pkgs/clan-cli/emulate_fastapi.py create mode 100644 pkgs/clan-cli/tests/openapi_client/docs/Roles.md create mode 100644 pkgs/clan-cli/tests/openapi_client/models/roles.py diff --git a/pkgs/clan-cli/clan_cli/webui/__init__.py b/pkgs/clan-cli/clan_cli/webui/__init__.py index 1305e78..3848f9d 100644 --- a/pkgs/clan-cli/clan_cli/webui/__init__.py +++ b/pkgs/clan-cli/clan_cli/webui/__init__.py @@ -28,6 +28,12 @@ def register_parser(parser: argparse.ArgumentParser) -> None: help="Populate the database with dummy data", default=False, ) + parser.add_argument( + "--emulate", + action="store_true", + help="Emulate two entities c1 and c2 + dlg and ap", + default=False, + ) parser.add_argument( "--no-open", action="store_true", help="Don't open the browser", default=False ) diff --git a/pkgs/clan-cli/clan_cli/webui/server.py b/pkgs/clan-cli/clan_cli/webui/server.py index 5d0f388..932e1d6 100644 --- a/pkgs/clan-cli/clan_cli/webui/server.py +++ b/pkgs/clan-cli/clan_cli/webui/server.py @@ -127,25 +127,34 @@ def start_server(args: argparse.Namespace) -> None: subprocess.run(cmd, check=True) if args.emulate: - # todo move emu - from .emulate_fastapi import (app_dlg, app_ap, app_c1, app_c2) - from .api import (get_health, port_dlg, port_ap, port_client_base) import multiprocessing as mp - port = port_dlg - host = host - # server - proc = mp.Process( - target=uvicorn.run, - args=(app_dlg,), - kwargs={"host": host, "port": port, "log_level": "info"}, - daemon=True, - ) - proc.start() - url = f"http://{host}:{port}" - res = get_health(url=url + "/health") - if res is None: - raise Exception(f"Couldn't reach {url} after starting server") + from config import host, port_ap, port_client_base, port_dlg + from emulate_fastapi import app_ap, app_c1, app_c2, app_dlg, get_health + + app_ports = [ + (app_dlg, port_dlg), + (app_ap, port_ap), + (app_c1, port_client_base), + (app_c2, port_client_base + 1), + ] + urls = list() + # start servers as processes (dlg, ap, c1 and c2 for tests) + for app, port in app_ports: + breakpoint() + proc = mp.Process( + target=uvicorn.run, + args=(app,), + kwargs={"host": host, "port": port, "log_level": "info"}, + daemon=True, + ) + proc.start() + urls.append(f"http://{host}:{port}") + # check server health + for url in urls: + res = get_health(url=url + "/health") + if res is None: + raise Exception(f"Couldn't reach {url} after starting server") uvicorn.run( "clan_cli.webui.app:app", diff --git a/pkgs/clan-cli/clan_cli/webui/sql_models.py b/pkgs/clan-cli/clan_cli/webui/sql_models.py index 9b8bb29..d7c4f2a 100644 --- a/pkgs/clan-cli/clan_cli/webui/sql_models.py +++ b/pkgs/clan-cli/clan_cli/webui/sql_models.py @@ -1,4 +1,4 @@ -from sqlalchemy import JSON, Boolean, Column, ForeignKey, Integer, String, Text, Enum +from sqlalchemy import JSON, Boolean, Column, Enum, ForeignKey, Integer, String, Text from sqlalchemy.orm import relationship from .schemas import Roles @@ -16,7 +16,8 @@ class Entity(Base): name = Column(String, index=True, unique=True) ip = Column(String, index=True) network = Column(String, index=True) - role = Column(Enum(Roles), index=True) + role = Column(Enum(Roles), index=True, nullable=False) # type: ignore + # role = Column(String, index=True, nullable=False) attached = Column(Boolean, index=True) visible = Column(Boolean, index=True) stop_health_task = Column(Boolean) diff --git a/pkgs/clan-cli/config.py b/pkgs/clan-cli/config.py new file mode 100644 index 0000000..2874a7d --- /dev/null +++ b/pkgs/clan-cli/config.py @@ -0,0 +1,4 @@ +host = "127.0.0.1" +port_dlg = 6000 +port_ap = 6600 +port_client_base = 7000 diff --git a/pkgs/clan-cli/emulate_fastapi.py b/pkgs/clan-cli/emulate_fastapi.py new file mode 100644 index 0000000..d663c9a --- /dev/null +++ b/pkgs/clan-cli/emulate_fastapi.py @@ -0,0 +1,205 @@ +import sys +import time +import urllib + +from fastapi import FastAPI +from fastapi.responses import HTMLResponse + +app_dlg = FastAPI() +app_ap = FastAPI() +app_c1 = FastAPI() +app_c2 = FastAPI() + +# bash tests: curl localhost:6600/ap_list_of_services +# curl localhost:7001/consume_service_from_other_entity + + +#### HEALTH + + +@app_c1.get("/health") +async def healthcheck_c1() -> str: + return "200 OK" + + +@app_c2.get("/health") +async def healthcheck_c2() -> str: + return "200 OK" + + +@app_dlg.get("/health") +async def healthcheck_dlg() -> str: + return "200 OK" + + +@app_ap.get("/health") +async def healthcheck_ap() -> str: + return "200 OK" + + +def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | None: + for attempt in range(max_retries): + try: + with urllib.request.urlopen(url) as response: + return response.read() + except urllib.error.URLError as e: + print(f"Attempt {attempt + 1} failed: {e.reason}", file=sys.stderr) + time.sleep(delay) + return None + + +#### CONSUME SERVICE + +# TODO send_msg??? + + +@app_c1.get("/consume_service_from_other_entity", response_class=HTMLResponse) +async def consume_service_from_other_entity_c1() -> HTMLResponse: + html_content = """ + + +
+ + + """ + time.sleep(3) + return HTMLResponse(content=html_content, status_code=200) + + +@app_c2.get("/consume_service_from_other_entity", response_class=HTMLResponse) +async def consume_service_from_other_entity_c2() -> HTMLResponse: + html_content = """ + + +
+ + + """ + time.sleep(3) + return HTMLResponse(content=html_content, status_code=200) + + +#### ap_list_of_services + + +@app_ap.get("/ap_list_of_services", response_class=HTMLResponse) +async def ap_list_of_services() -> HTMLResponse: + html_content = b"""HTTP/1.1 200 OK\r\n\r\n[[ + { + "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30df", + "service_name": "Carlos Printing", + "service_type": "3D Printing", + "endpoint_url": "http://127.0.0.1:8000", + "status": "unknown", + "other": { + "action": [ + "register", + "deregister", + "delete", + "create" + ] + }, + "entity_did": "did:sov:test:1234" + }, + { + "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d1", + "service_name": "Luiss Fax", + "service_type": "Fax", + "endpoint_url": "http://127.0.0.1:8000", + "status": "unknown", + "other": { + "action": [ + "register", + "deregister", + "delete", + "create" + ] + }, + "entity_did": "did:sov:test:1235" + }, + { + "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d2", + "service_name": "Erdems VR-Stream", + "service_type": "VR-Stream", + "endpoint_url": "http://127.0.0.1:8000", + "status": "unknown", + "other": { + "action": [ + "register", + "deregister", + "delete", + "create" + ] + }, + "entity_did": "did:sov:test:1236" + }, + { + "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d3", + "service_name": "Onurs gallary", + "service_type": "gallary", + "endpoint_url": "http://127.0.0.1:8000", + "status": "unknown", + "other": { + "action": [ + "register", + "deregister", + "delete", + "create" + ] + }, + "entity_did": "did:sov:test:1237" + }, + { + "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d4", + "service_name": "Saras Game-Shop", + "service_type": "Game-Shop", + "endpoint_url": "http://127.0.0.1:8000", + "status": "unknown", + "other": { + "action": [ + "register", + "deregister", + "delete", + "create" + ] + }, + "entity_did": "did:sov:test:1238" + } +]]""" + return HTMLResponse(content=html_content, status_code=200) + + +@app_dlg.get("/dlg_list_of_did_resolutions", response_class=HTMLResponse) +async def dlg_list_of_did_resolutions() -> HTMLResponse: + html_content = b"""HTTP/1.1 200 OK\r\n\r\n +[ + { + "did": "did:sov:test:1234", + "name": "C1", + "ip": "127.0.0.1:5100", + "attached": false, + "visible": true, + "other": { + "network": "Carlo1's Home Network", + "roles": [ + "service repository", + "service consumer" + ] + } + }, + { + "did": "did:sov:test:1235", + "name": "C2", + "ip": "127.0.0.1:5100", + "attached": false, + "visible": true, + "other": { + "network": "Carlo2's Home Network", + "roles": [ + "service repository", + "service prosumer" + ] + } + } +]""" + return HTMLResponse(content=html_content, status_code=200) diff --git a/pkgs/clan-cli/tests/api.py b/pkgs/clan-cli/tests/api.py index d538f42..101f3e3 100644 --- a/pkgs/clan-cli/tests/api.py +++ b/pkgs/clan-cli/tests/api.py @@ -11,10 +11,8 @@ from fastapi.testclient import TestClient from openapi_client import ApiClient, Configuration from ports import PortFunction -from clan_cli.webui.app import app - -import emulate_fastapi import config +from clan_cli.webui.app import app @pytest.fixture(scope="session") @@ -55,98 +53,6 @@ def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: yield url proc.terminate() -# Pytest fixture to run the server in a separate process -# emulating c1 -@pytest.fixture(scope="session") -def server_c1() -> Generator[str, None, None]: - port = port_client_base - host = host - # server - proc = Process( - target=uvicorn.run, - args=(app,), - kwargs={"host": host, "port": port, "log_level": "info"}, - daemon=True, - ) - proc.start() - - url = f"http://{host}:{port}" - res = get_health(url=url + "/health") - if res is None: - raise Exception(f"Couldn't reach {url} after starting server") - - yield url - proc.terminate() - -# Pytest fixture to run the server in a separate process -# emulating c2 -@pytest.fixture(scope="session") -def server_c2() -> Generator[str, None, None]: - port = port_client_base+1 - host = host - # server - proc = Process( - target=uvicorn.run, - args=(app,), - kwargs={"host": host, "port": port, "log_level": "info"}, - daemon=True, - ) - proc.start() - - url = f"http://{host}:{port}" - res = get_health(url=url + "/health") - if res is None: - raise Exception(f"Couldn't reach {url} after starting server") - - yield url - proc.terminate() - proc.terminate() - -# Pytest fixture to run the server in a separate process -# emulating ap -@pytest.fixture(scope="session") -def server_ap() -> Generator[str, None, None]: - port = port_ap - host = host - # server - proc = Process( - target=uvicorn.run, - args=(app,), - kwargs={"host": host, "port": port, "log_level": "info"}, - daemon=True, - ) - proc.start() - - url = f"http://{host}:{port}" - res = get_health(url=url + "/health") - if res is None: - raise Exception(f"Couldn't reach {url} after starting server") - - yield url - proc.terminate() - -# Pytest fixture to run the server in a separate process -# emulating dlg -@pytest.fixture(scope="session") -def server_dlg() -> Generator[str, None, None]: - port = port_dlg - host = host - # server - proc = Process( - target=uvicorn.run, - args=(app,), - kwargs={"host": host, "port": port, "log_level": "info"}, - daemon=True, - ) - proc.start() - - url = f"http://{host}:{port}" - res = get_health(url=url + "/health") - if res is None: - raise Exception(f"Couldn't reach {url} after starting server") - - yield url - proc.terminate() @pytest.fixture(scope="session") def api_client(server_url: str) -> Generator[ApiClient, None, None]: diff --git a/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md b/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md index 9a4a45c..aef64f7 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/DefaultApi.md @@ -1,15 +1,15 @@ # openapi_client.DefaultApi -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get**](DefaultApi.md#get) | **GET** /ws2_example | Get -[**health**](DefaultApi.md#health) | **GET** /health | Health -[**root**](DefaultApi.md#root) | **GET** /{path_name} | Root +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ---------------------------------- | -------------------- | ----------- | +| [**get**](DefaultApi.md#get) | **GET** /ws2_example | Get | +| [**health**](DefaultApi.md#health) | **GET** /health | Health | +| [**root**](DefaultApi.md#root) | **GET** /{path_name} | Root | # **get** + > get() Get @@ -42,9 +42,8 @@ with openapi_client.ApiClient(configuration) as api_client: print("Exception when calling DefaultApi->get: %s\n" % e) ``` - - ### Parameters + This endpoint does not need any parameter. ### Return type @@ -57,17 +56,19 @@ 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) # **health** + > Machine health() Health @@ -103,9 +104,8 @@ with openapi_client.ApiClient(configuration) as api_client: print("Exception when calling DefaultApi->health: %s\n" % e) ``` - - ### Parameters + This endpoint does not need any parameter. ### Return type @@ -118,17 +118,19 @@ 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 @@ -153,7 +155,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 @@ -162,13 +164,11 @@ 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 @@ -180,14 +180,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 4a99b6c..dc621f8 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* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**attach_entity**](EntitiesApi.md#attach_entity) | **POST** /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) | **POST** /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_name**](EntitiesApi.md#get_entity_by_name) | **GET** /api/v1/entity_by_name | Get Entity By Name -[**is_attached**](EntitiesApi.md#is_attached) | **GET** /api/v1/is_attached | Is Attached +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ----------------------------------------------------------------- | --------------------------------- | --------------------- | +| [**attach_entity**](EntitiesApi.md#attach_entity) | **POST** /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) | **POST** /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_name**](EntitiesApi.md#get_entity_by_name) | **GET** /api/v1/entity_by_name | Get Entity By Name | +| [**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,15 +53,13 @@ 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:1234'] - **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:1234'] | +| **skip** | **int** | | [optional] [default to 0] | +| **limit** | **int** | | [optional] [default to 100] | ### Return type @@ -73,18 +71,20 @@ 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,13 +122,11 @@ 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 @@ -140,18 +138,20 @@ 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,13 +187,11 @@ 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:1234'] +| Name | Type | Description | Notes | +| -------------- | ------- | ----------- | --------------------------------------------------- | +| **entity_did** | **str** | | [optional] [default to 'did:sov:test:1234'] | ### Return type @@ -205,18 +203,20 @@ 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,15 +254,13 @@ 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:1234'] - **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:1234'] | +| **skip** | **int** | | [optional] [default to 0] | +| **limit** | **int** | | [optional] [default to 100] | ### Return type @@ -274,18 +272,20 @@ 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,14 +323,12 @@ 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 @@ -342,18 +340,20 @@ 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,14 +391,12 @@ 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 @@ -410,18 +408,20 @@ 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,13 +458,11 @@ 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:1234'] +| Name | Type | Description | Notes | +| -------------- | ------- | ----------- | --------------------------------------------------- | +| **entity_did** | **str** | | [optional] [default to 'did:sov:test:1234'] | ### Return type @@ -476,18 +474,20 @@ 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_name** + > Entity get_entity_by_name(entity_name) Get Entity By Name @@ -513,7 +513,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_name = 'entity_name_example' # str | + entity_name = 'entity_name_example' # str | try: # Get Entity By Name @@ -524,13 +524,11 @@ with openapi_client.ApiClient(configuration) as api_client: print("Exception when calling EntitiesApi->get_entity_by_name: %s\n" % e) ``` - - ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **entity_name** | **str**| | +| Name | Type | Description | Notes | +| --------------- | ------- | ----------- | ----- | +| **entity_name** | **str** | | ### Return type @@ -542,18 +540,20 @@ 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 @@ -589,13 +589,11 @@ 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:1234'] +| Name | Type | Description | Notes | +| -------------- | ------- | ----------- | --------------------------------------------------- | +| **entity_did** | **str** | | [optional] [default to 'did:sov:test:1234'] | ### Return type @@ -607,14 +605,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 4818b3b..807f6a6 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** | | -**role** | [**Roles**](Roles.md) | | -**visible** | **bool** | | -**other** | **object** | | -**attached** | **bool** | | -**stop_health_task** | **bool** | | + +| Name | Type | Description | Notes | +| -------------------- | --------------------- | ----------- | ----- | +| **did** | **str** | | +| **name** | **str** | | +| **ip** | **str** | | +| **network** | **str** | | +| **role** | [**Roles**](Roles.md) | | +| **visible** | **bool** | | +| **other** | **object** | | +| **attached** | **bool** | | +| **stop_health_task** | **bool** | | ## Example @@ -31,6 +31,5 @@ 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 306e4c0..ea30366 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** | | -**role** | [**Roles**](Roles.md) | | -**visible** | **bool** | | -**other** | **object** | | + +| Name | Type | Description | Notes | +| ----------- | --------------------- | ----------- | ----- | +| **did** | **str** | | +| **name** | **str** | | +| **ip** | **str** | | +| **network** | **str** | | +| **role** | [**Roles**](Roles.md) | | +| **visible** | **bool** | | +| **other** | **object** | | ## Example @@ -29,6 +29,5 @@ 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 e51e987..cbe65cb 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 ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**timestamp** | **int** | | -**group** | **int** | | -**group_id** | **int** | | -**msg_type** | **int** | | -**src_did** | **str** | | -**des_did** | **str** | | -**msg** | **object** | | + +| Name | Type | Description | Notes | +| ------------- | ---------- | ----------- | ----- | +| **id** | **int** | | +| **timestamp** | **int** | | +| **group** | **int** | | +| **group_id** | **int** | | +| **msg_type** | **int** | | +| **src_did** | **str** | | +| **des_did** | **str** | | +| **msg** | **object** | | ## Example @@ -30,6 +30,5 @@ 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 bfb7347..eb6f16d 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EventmessageCreate.md @@ -1,17 +1,17 @@ # EventmessageCreate - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**timestamp** | **int** | | -**group** | **int** | | -**group_id** | **int** | | -**msg_type** | **int** | | -**src_did** | **str** | | -**des_did** | **str** | | -**msg** | **object** | | + +| Name | Type | Description | Notes | +| ------------- | ---------- | ----------- | ----- | +| **id** | **int** | | +| **timestamp** | **int** | | +| **group** | **int** | | +| **group_id** | **int** | | +| **msg_type** | **int** | | +| **src_did** | **str** | | +| **des_did** | **str** | | +| **msg** | **object** | | ## Example @@ -30,6 +30,5 @@ 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 e146d13..d6affb9 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* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_eventmessage**](EventmessagesApi.md#create_eventmessage) | **POST** /api/v1/send_msg | Create Eventmessage -[**get_all_eventmessages**](EventmessagesApi.md#get_all_eventmessages) | **GET** /api/v1/event_messages | Get All Eventmessages +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ---------------------------------------------------------------------- | ------------------------------ | --------------------- | +| [**create_eventmessage**](EventmessagesApi.md#create_eventmessage) | **POST** /api/v1/send_msg | 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,13 +46,11 @@ 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 @@ -64,18 +62,20 @@ 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,14 +113,12 @@ 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 @@ -132,14 +130,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 5eee49b..d4902e7 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] + +| Name | Type | Description | Notes | +| ---------- | ----------------------------------------------- | ----------- | ---------- | +| **detail** | [**List[ValidationError]**](ValidationError.md) | | [optional] | ## Example @@ -23,6 +23,5 @@ 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 4ea6dc3..062fd51 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) | | + +| Name | Type | Description | Notes | +| ---------- | ----------------------- | ----------- | ----- | +| **name** | **str** | | +| **status** | [**Status**](Status.md) | | ## Example @@ -24,6 +24,5 @@ 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 7a24ab0..ff735f0 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* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_all_repositories**](RepositoriesApi.md#get_all_repositories) | **GET** /api/v1/repositories | Get All Repositories +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 | # **get_all_repositories** + > List[Service] get_all_repositories(skip=skip, limit=limit) Get All Repositories @@ -45,14 +45,12 @@ 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 @@ -64,14 +62,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 27a3992..27928d5 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Resolution.md @@ -1,15 +1,15 @@ # Resolution - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**requester_name** | **str** | | -**requester_did** | **str** | | -**resolved_did** | **str** | | -**other** | **object** | | -**timestamp** | **datetime** | | -**id** | **int** | | + +| Name | Type | Description | Notes | +| ------------------ | ------------ | ----------- | ----- | +| **requester_name** | **str** | | +| **requester_did** | **str** | | +| **resolved_did** | **str** | | +| **other** | **object** | | +| **timestamp** | **datetime** | | +| **id** | **int** | | ## Example @@ -28,6 +28,5 @@ 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 a2ae852..24da5fb 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* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_all_resolutions**](ResolutionApi.md#get_all_resolutions) | **GET** /api/v1/resolutions | Get All Resolutions +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 | # **get_all_resolutions** + > List[Resolution] get_all_resolutions(skip=skip, limit=limit) Get All Resolutions @@ -45,14 +45,12 @@ 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 @@ -64,14 +62,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/Roles.md b/pkgs/clan-cli/tests/openapi_client/docs/Roles.md new file mode 100644 index 0000000..994fa4c --- /dev/null +++ b/pkgs/clan-cli/tests/openapi_client/docs/Roles.md @@ -0,0 +1,10 @@ +# Roles + +An enumeration. + +## Properties + +| 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 bff9e15..5798f74 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Service.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Service.md @@ -1,17 +1,17 @@ # Service - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **str** | | -**service_name** | **str** | | -**service_type** | **str** | | -**endpoint_url** | **str** | | -**status** | **str** | | -**other** | **object** | | -**entity_did** | **str** | | -**entity** | [**Entity**](Entity.md) | | + +| Name | Type | Description | Notes | +| ---------------- | ----------------------- | ----------- | ----- | +| **uuid** | **str** | | +| **service_name** | **str** | | +| **service_type** | **str** | | +| **endpoint_url** | **str** | | +| **status** | **str** | | +| **other** | **object** | | +| **entity_did** | **str** | | +| **entity** | [**Entity**](Entity.md) | | ## Example @@ -30,6 +30,5 @@ 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 f8e84e1..7843b1a 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/ServiceCreate.md @@ -1,16 +1,16 @@ # ServiceCreate - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**uuid** | **str** | | -**service_name** | **str** | | -**service_type** | **str** | | -**endpoint_url** | **str** | | -**status** | **str** | | -**other** | **object** | | -**entity_did** | **str** | | + +| Name | Type | Description | Notes | +| ---------------- | ---------- | ----------- | ----- | +| **uuid** | **str** | | +| **service_name** | **str** | | +| **service_type** | **str** | | +| **endpoint_url** | **str** | | +| **status** | **str** | | +| **other** | **object** | | +| **entity_did** | **str** | | ## Example @@ -29,6 +29,5 @@ 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/ServicesApi.md b/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md index 9a2c544..006615a 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/ServicesApi.md @@ -1,17 +1,17 @@ # openapi_client.ServicesApi -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**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 +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ----------------------------------------------------------------------------- | --------------------------------------- | --------------------------- | +| [**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 | # **create_service** + > Service create_service(service_create) Create Service @@ -38,7 +38,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 @@ -49,13 +49,11 @@ 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 @@ -67,18 +65,20 @@ 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 @@ -114,13 +114,11 @@ 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:1234'] +| Name | Type | Description | Notes | +| -------------- | ------- | ----------- | --------------------------------------------------- | +| **entity_did** | **str** | | [optional] [default to 'did:sov:test:1234'] | ### Return type @@ -132,18 +130,20 @@ 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 @@ -181,14 +181,12 @@ 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 @@ -200,18 +198,20 @@ 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 @@ -250,15 +250,13 @@ 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:1234'] - **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:1234'] | +| **skip** | **int** | | [optional] [default to 0] | +| **limit** | **int** | | [optional] [default to 100] | ### Return type @@ -270,18 +268,20 @@ 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_services_without_entity** + > List[Service] get_services_without_entity(entity_did=entity_did, skip=skip, limit=limit) Get Services Without Entity @@ -320,15 +320,13 @@ 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:1234'] - **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:1234'] | +| **skip** | **int** | | [optional] [default to 0] | +| **limit** | **int** | | [optional] [default to 100] | ### Return type @@ -340,14 +338,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/Status.md b/pkgs/clan-cli/tests/openapi_client/docs/Status.md index 3b89cf4..10bd223 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Status.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Status.md @@ -3,9 +3,8 @@ 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 04310f6..b57b565 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** | | + +| Name | Type | Description | Notes | +| -------- | --------------------------------------------------------------- | ----------- | ----- | +| **loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | | +| **msg** | **str** | | +| **type** | **str** | | ## Example @@ -25,6 +25,5 @@ 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 0bae52d..04e49df 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 ------------- | ------------- | ------------- | ------------- + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | ## Example @@ -22,6 +22,5 @@ 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/roles.py b/pkgs/clan-cli/tests/openapi_client/models/roles.py new file mode 100644 index 0000000..189cbd3 --- /dev/null +++ b/pkgs/clan-cli/tests/openapi_client/models/roles.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + FastAPI + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import pprint +import re # noqa: F401 +from aenum import Enum, no_arg + + + + + +class Roles(str, Enum): + """ + An enumeration. + """ + + """ + allowed enum values + """ + SERVICE_PROSUMER = 'service_prosumer' + AP = 'AP' + DLG = 'DLG' + + @classmethod + def from_json(cls, json_str: str) -> Roles: + """Create an instance of Roles from a JSON string""" + return Roles(json.loads(json_str)) + + diff --git a/pkgs/clan-cli/tests/test_db_api.py b/pkgs/clan-cli/tests/test_db_api.py index 2248503..5cf4324 100644 --- a/pkgs/clan-cli/tests/test_db_api.py +++ b/pkgs/clan-cli/tests/test_db_api.py @@ -1,7 +1,6 @@ import random import time import uuid -import api from openapi_client import ApiClient from openapi_client.api import DefaultApi @@ -14,18 +13,20 @@ from openapi_client.models import ( Eventmessage, EventmessageCreate, Machine, + Roles, ServiceCreate, Status, - Roles, ) +import config + random.seed(42) -#is linked to the emulate_fastapi.py and api.py -host = api.host -port_dlg = api.port_dlg -port_ap = api.port_ap -port_client_base = api.port_client_base + +host = config.host +port_dlg = config.port_dlg +port_ap = config.port_ap +port_client_base = config.port_client_base num_uuids = 100 uuids = [str(uuid.UUID(int=random.getrandbits(128))) for i in range(num_uuids)] @@ -44,7 +45,7 @@ def create_entities(num: int = 10) -> list[EntityCreate]: did=f"did:sov:test:12{i}", name=f"C{i}", ip=f"{host}:{port_client_base+i}", - network=f"255.255.0.0", + network="255.255.0.0", role=Roles("service_prosumer"), visible=True, other={}, @@ -52,9 +53,9 @@ def create_entities(num: int = 10) -> list[EntityCreate]: res.append(en) dlg = EntityCreate( did=f"did:sov:test:{port_dlg}", - name=f"DLG", + name="DLG", ip=f"{host}:{port_dlg}/health", - network=f"255.255.0.0", + network="255.255.0.0", role=Roles("DLG"), visible=True, other={}, @@ -62,9 +63,9 @@ def create_entities(num: int = 10) -> list[EntityCreate]: res.append(dlg) ap = EntityCreate( did=f"did:sov:test:{port_ap}", - name=f"AP", + name="AP", ip=f"{host}:{port_ap}/health", - network=f"255.255.0.0", + network="255.255.0.0", role=Roles("AP"), visible=True, other={}, @@ -168,4 +169,4 @@ def test_create_eventmessages(api_client: ApiClient) -> None: res: Eventmessage = api.create_eventmessage(own_eventmsg) # breakpoint() assert res.id == own_eventmsg.id - assert [] != api.get_all_eventmessages() \ No newline at end of file + assert [] != api.get_all_eventmessages() -- 2.51.0 From 36492a14c9153632e9c5332caf0c6bef568beb71 Mon Sep 17 00:00:00 2001 From: Georg-Stahn Date: Thu, 11 Jan 2024 15:35:50 +0100 Subject: [PATCH 4/5] readme for --emulate flag --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 89d5105..d506cd8 100644 --- a/README.md +++ b/README.md @@ -73,12 +73,11 @@ sudo echo "experimental-features = nix-command flakes" > '/etc/nix/nix.conf' - To start the backend server, execute: ```bash - clan webui --reload --no-open --log-level debug --populate + clan webui --reload --no-open --log-level debug --populate --emulate ``` - The server will automatically restart if any Python files change. - The `--populate` flag will automatically populate the database with dummy data - - - To emulate some distributed system behavior run `python3 tests/emulate_fastapi.py` + - The `--emulate` flag will automatically run servers the database with dummy data for the fronted to communicate with (ap, dlg, c1 and c2) 8. **Build the Frontend**: -- 2.51.0 From 09fe544d909a07c05b9ee7f97c31ac69fdd14942 Mon Sep 17 00:00:00 2001 From: Georg-Stahn Date: Thu, 11 Jan 2024 15:45:32 +0100 Subject: [PATCH 5/5] dealte breakpoint :') --- pkgs/clan-cli/clan_cli/webui/server.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/clan-cli/clan_cli/webui/server.py b/pkgs/clan-cli/clan_cli/webui/server.py index 932e1d6..7cd9165 100644 --- a/pkgs/clan-cli/clan_cli/webui/server.py +++ b/pkgs/clan-cli/clan_cli/webui/server.py @@ -141,7 +141,6 @@ def start_server(args: argparse.Namespace) -> None: urls = list() # start servers as processes (dlg, ap, c1 and c2 for tests) for app, port in app_ports: - breakpoint() proc = mp.Process( target=uvicorn.run, args=(app,), -- 2.51.0