From 1cb81473c33842f5b72e877a03794c3d528bd384 Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 18:31:19 +0100 Subject: [PATCH 1/8] Trying to fix attach entity --- pkgs/clan-cli/clan_cli/webui/app.py | 1 - .../clan_cli/webui/routers/endpoints.py | 157 +++++++----- pkgs/clan-cli/clan_cli/webui/schemas.py | 1 + pkgs/clan-cli/clan_cli/webui/sql_app.db | Bin 118784 -> 0 bytes pkgs/clan-cli/clan_cli/webui/sql_crud.py | 27 +- pkgs/clan-cli/clan_cli/webui/sql_models.py | 1 + pkgs/clan-cli/clan_cli/webui/tags.py | 5 - pkgs/clan-cli/emulate_entity.sh | 2 +- .../clan-cli/tests/openapi_client/__init__.py | 1 - .../tests/openapi_client/api/entities_api.py | 64 ++--- .../tests/openapi_client/api/services_api.py | 73 +++--- .../tests/openapi_client/docs/DefaultApi.md | 68 ++--- .../tests/openapi_client/docs/EntitiesApi.md | 240 +++++++++--------- .../tests/openapi_client/docs/Entity.md | 21 +- .../tests/openapi_client/docs/EntityCreate.md | 19 +- .../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 | 172 ++++++------- .../openapi_client/docs/ServicesByName.md | 28 -- .../tests/openapi_client/docs/Status.md | 7 +- .../openapi_client/docs/ValidationError.md | 15 +- .../docs/ValidationErrorLocInner.md | 9 +- .../tests/openapi_client/models/__init__.py | 1 - .../openapi_client/models/services_by_name.py | 85 ------- .../openapi_client/test/test_services_api.py | 6 +- .../test/test_services_by_name.py | 99 -------- pkgs/ui/src/app/access-point/page.tsx | 2 +- pkgs/ui/src/app/client/[client_name]/page.tsx | 202 ++++++++++----- ...tyById.tsx => useGetEntityByNameOrDid.tsx} | 4 +- pkgs/ui/src/components/table/index.tsx | 1 - pkgs/ui/src/config/client_1/index.tsx | 1 - 36 files changed, 695 insertions(+), 778 deletions(-) delete mode 100644 pkgs/clan-cli/clan_cli/webui/sql_app.db delete mode 100644 pkgs/clan-cli/tests/openapi_client/docs/ServicesByName.md delete mode 100644 pkgs/clan-cli/tests/openapi_client/models/services_by_name.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_services_by_name.py rename pkgs/ui/src/components/hooks/{useGetEntityById.tsx => useGetEntityByNameOrDid.tsx} (80%) diff --git a/pkgs/clan-cli/clan_cli/webui/app.py b/pkgs/clan-cli/clan_cli/webui/app.py index 8913f72..99d7e9e 100644 --- a/pkgs/clan-cli/clan_cli/webui/app.py +++ b/pkgs/clan-cli/clan_cli/webui/app.py @@ -33,7 +33,6 @@ for u in cors_url: # Logging setup log = logging.getLogger(__name__) - @asynccontextmanager async def lifespan(app: FastAPI) -> Any: await socket_manager2.brd.connect() diff --git a/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py b/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py index 4aec32b..9b601aa 100644 --- a/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py +++ b/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py @@ -2,6 +2,7 @@ import logging import time from datetime import datetime from typing import List, Optional +import asyncio import httpx from fastapi import APIRouter, BackgroundTasks, Depends @@ -30,7 +31,7 @@ log = logging.getLogger(__name__) # # ######################### @router.post("/api/v1/service", response_model=Service, tags=[Tags.services]) -async def create_service( +def create_service( service: ServiceCreate, db: Session = Depends(sql_db.get_db) ) -> Service: # todo checken ob schon da ... @@ -38,7 +39,7 @@ async def create_service( @router.get("/api/v1/services", response_model=List[Service], tags=[Tags.services]) -async def get_all_services( +def get_all_services( skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db) ) -> List[sql_models.Service]: services = sql_crud.get_services(db, skip=skip, limit=limit) @@ -46,9 +47,9 @@ async def get_all_services( @router.get( - "/api/v1/{entity_did}/service", response_model=List[Service], tags=[Tags.services] + "/api/v1/service", response_model=List[Service], tags=[Tags.services] ) -async def get_service_by_did( +def get_service_by_did( entity_did: str = "did:sov:test:1234", skip: int = 0, limit: int = 100, @@ -59,25 +60,21 @@ async def get_service_by_did( @router.get( - "/api/v1/services_by_entity_name", - response_model=ServicesByName, + "/api/v1/services_without_entity", + response_model=List[Service], tags=[Tags.services], ) -async def get_services_by_name( - entity_name: str, +def get_services_without_entity( + entity_did: str = "did:sov:test:1234", skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db), -) -> ServicesByName: - entity = sql_crud.get_entity_by_name(db, name=entity_name) - if entity is None: - raise ClanError(f"Entity with name '{entity_name}' not found") - services = sql_crud.get_services_by_entity_did(db, entity_did=str(entity.did)) - return ServicesByName(entity=entity, services=services) # type: ignore +) -> List[sql_models.Service]: + service = sql_crud.get_services_without_entity_id(db, entity_did=entity_did) + return service - -@router.delete("/api/v1/{entity_did}/service", tags=[Tags.services]) -async def delete_service( +@router.delete("/api/v1/service", tags=[Tags.services]) +def delete_service( entity_did: str = "did:sov:test:1234", db: Session = Depends(sql_db.get_db), ) -> dict[str, str]: @@ -95,7 +92,7 @@ async def delete_service( response_model=List[Service], tags=[Tags.repositories], ) -async def get_all_repositories( +def get_all_repositories( skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db) ) -> List[sql_models.Service]: repositories = sql_crud.get_services(db, skip=skip, limit=limit) @@ -108,7 +105,7 @@ async def get_all_repositories( # # ######################### @router.post("/api/v1/entity", response_model=Entity, tags=[Tags.entities]) -async def create_entity( +def create_entity( entity: EntityCreate, db: Session = Depends(sql_db.get_db) ) -> EntityCreate: return sql_crud.create_entity(db, entity) @@ -117,7 +114,7 @@ async def create_entity( @router.get( "/api/v1/entity_by_name", response_model=Optional[Entity], tags=[Tags.entities] ) -async def get_entity_by_name( +def get_entity_by_name( entity_name: str, db: Session = Depends(sql_db.get_db) ) -> Optional[sql_models.Entity]: entity = sql_crud.get_entity_by_name(db, name=entity_name) @@ -125,7 +122,7 @@ async def get_entity_by_name( @router.get("/api/v1/entities", response_model=List[Entity], tags=[Tags.entities]) -async def get_all_entities( +def get_all_entities( skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db) ) -> List[sql_models.Entity]: entities = sql_crud.get_entities(db, skip=skip, limit=limit) @@ -133,9 +130,9 @@ async def get_all_entities( @router.get( - "/api/v1/{entity_did}/entity", response_model=Optional[Entity], tags=[Tags.entities] + "/api/v1/entity", response_model=Optional[Entity], tags=[Tags.entities] ) -async def get_entity_by_did( +def get_entity_by_did( entity_did: str = "did:sov:test:1234", db: Session = Depends(sql_db.get_db), ) -> Optional[sql_models.Entity]: @@ -148,61 +145,103 @@ async def get_entity_by_did( response_model=List[Entity], tags=[Tags.entities], ) -async def get_attached_entities( +def get_attached_entities( skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db) ) -> List[sql_models.Entity]: entities = sql_crud.get_attached_entities(db, skip=skip, limit=limit) return entities - -@router.post("/api/v1/{entity_did}/detach", response_model=Entity, tags=[Tags.entities]) -async def detach_entity( - background_tasks: BackgroundTasks, +@router.get("/api/v1/is_attached", tags=[Tags.entities]) +def is_attached( entity_did: str = "did:sov:test:1234", - skip: int = 0, - limit: int = 100, - db: Session = Depends(sql_db.get_db), -) -> sql_models.Entity: - entity = sql_crud.set_attached_by_entity_did(db, entity_did, False) - return entity + db: Session = Depends(sql_db.get_db)) -> dict[str, str]: + + entity = sql_crud.get_entity_by_did(db, did=entity_did) + + if entity is None: + raise ClanError(f"Entity with did '{entity_did}' not found") + + timer = 0.0 + timeout = 2 + while not entity.attached: + time.sleep(0.1) + + timer += 0.1 + if timer > timeout: + url = f"http://{entity.ip}" + raise ClanError(f"Entity at {url} not reachable") + + return {"message": f"Attached to {entity.name} successfully"} -@router.post("/api/v1/{entity_did}/attach", tags=[Tags.entities]) -async def attach_entity( + +@router.post("/api/v1/detach", tags=[Tags.entities]) +def detach_entity( background_tasks: BackgroundTasks, entity_did: str = "did:sov:test:1234", skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db), ) -> dict[str, str]: - if sql_crud.get_entity_by_did(db, entity_did) is None: - raise ClanError(f"Entity with did '{entity_did}' not found") - - background_tasks.add_task(attach_entity_loc, db, entity_did) - return {"message": "Attaching in the background"} + sql_crud.stop_entity_health_task(db, entity_did) + return {"message": f"Detached {entity_did} successfully"} -def attach_entity_loc(db: Session, entity_did: str) -> None: - db_entity = sql_crud.set_attached_by_entity_did(db, entity_did, True) - try: - while db_entity.attached: - # query status endpoint - # https://www.python-httpx.org/ - response = httpx.get(f"http://{db_entity.ip}", timeout=2) - print(response) - # test with: - # while true ; do printf 'HTTP/1.1 200 OK\r\n\r\ncool, thanks' | nc -l -N localhost 5555 ; done - # client test (apt install python3-httpx): - # httpx http://localhost:5555 - # except not reached set false +@router.post("/api/v1/attach", tags=[Tags.entities]) +def attach_entity( + background_tasks: BackgroundTasks, + entity_did: str = "did:sov:test:1234", + skip: int = 0, + limit: int = 100 +) -> dict[str, str]: + # entity = sql_crud.get_entity_by_did(db, did=entity_did) + # if entity is None: + # raise ClanError(f"Entity with did '{entity_did}' not found") + #url = f"http://{entity.ip}" + #log.info("Start health query at", url) + background_tasks.add_task(attach_entity_loc, entity_did) + return {"message": f"Started attachment task for {entity_did}"} + + +def attach_entity_loc(entity_did: str) -> None: + with sql_db.SessionLocal() as db: + entity = sql_crud.get_entity_by_did(db, did=entity_did) + while entity.stop_health_task is False: + entity = sql_crud.get_entity_by_did(db, did=entity_did) + assert entity is not None + log.warning(f"Stop health status task for {entity.stop_health_task}") time.sleep(1) - except Exception: - log.warning(f"Entity {entity_did} not reachable. Setting attached to false") + # entity = sql_crud.get_entity_by_did(db, did=entity_did) + # assert entity is not None + # try: - db_entity = sql_crud.set_attached_by_entity_did(db, entity_did, False) + # while True: -@router.delete("/api/v1/{entity_did}/entity", tags=[Tags.entities]) + # if entity.stop_health_task: + # print(f"Stop health status task for {entity.name}") + # break + + # url = f"http://{entity.ip}" + # response = httpx.get(url, timeout=2) + # #log.warning(f"Response {response.status_code} from {url}") + # print(f"{entity.name}: stop_health_task: {entity.stop_health_task}") + # if response.status_code != 200: + # raise ClanError(f"Entity with did '{entity_did}' returned {response.status_code}") + + # if entity.attached is False: + # sql_crud.set_attached_by_entity_did(db, entity_did, True) + # if entity is None: + # raise ClanError(f"Entity with did '{entity_did}' has been deleted") + + # time.sleep(1) + # except Exception: + # log.warning(f"Entity {entity_did} not reachable at {url}") + # finally: + # sql_crud.set_attached_by_entity_did(db, entity_did, False) + + +@router.delete("/api/v1/entity", tags=[Tags.entities]) async def delete_entity( entity_did: str = "did:sov:test:1234", db: Session = Depends(sql_db.get_db), @@ -216,8 +255,6 @@ async def delete_entity( # Resolution # # # ######################### - - @router.get( "/api/v1/resolutions", response_model=List[Resolution], tags=[Tags.resolutions] ) diff --git a/pkgs/clan-cli/clan_cli/webui/schemas.py b/pkgs/clan-cli/clan_cli/webui/schemas.py index bdb1a2e..f43e8dd 100644 --- a/pkgs/clan-cli/clan_cli/webui/schemas.py +++ b/pkgs/clan-cli/clan_cli/webui/schemas.py @@ -41,6 +41,7 @@ class EntityCreate(EntityBase): class Entity(EntityCreate): attached: bool = Field(...) + stop_health_task: bool = Field(...) class Config: orm_mode = True diff --git a/pkgs/clan-cli/clan_cli/webui/sql_app.db b/pkgs/clan-cli/clan_cli/webui/sql_app.db deleted file mode 100644 index 6d1f62ff087420f261feba70882b3ede2aef8603..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118784 zcmWFz^vNtqRY=P(%1ta$FlG>7U}R))P*7lCV5nkXV31`%fKmnq1{MUDff0#~i&@2> zm$!?T{|AE%6E_3DGXHVDgM8V1(!3{l{_s?D|K)Dt7T`R*95EL&MTm`^grGf!jU#%1`ZI8{R+NQO;ZTb?m9GcP5zBC{esIX|zsG&i-VI6gB4 z&X#o!a&-)GRq*t4ag9(wQ>EbVrvO)}ppluP*<>QcE-o+6*kWFin3R(WmxMEFx*8sevS=5ajCS8szHd>>3Qwk(pYopplZ9f}sh;cuiz|FqvWn4Ul^^ zxik%>*~DGt85zJ)QCyglS&|x`SXz<~<|9RnAv_#qY9-mlT~!$yWx;APE8>e%3-XII zOY(~{Q;Xw^Q;W(nlT+jK5_40LC8VIi506e{Nfce6xJ8y!&_Fg*Gh2dP+)|aXkrli3 zC5a`a#mL$v@mma5kHt!`xMqqto4BbeV=Y#@KtYIXlLTIyK&mnA0f}nXis1{<)V!2} z{LH+P_|l>rWb4H7T8FF)(^_O%&00}>*24n7q_O}dLdEb}kE{#RdSqG6rU+qnaaC2u zmSS+uMfM^xTLfw!B>y7IC}?nTmSpCp#wQo0CYGe8D7ZL=xQ2N8x+=K1x;cjWgeYh@ zhXw_?`h~=UM1w;deFMOm29dj9`5%=3KvAL);u;a6VQi*}QXs&b4NBX{g#b((6hz44 z$f1lZUJOoL$Remk4NBPoat_$FB$o?Zn&u*G;@+ybayN1q#v3B@L<@!3#qH%88wFtr zA6|06vnt55a8Y4s z1EO8CkPoMqkP{tTBR_6ykkzAk30X?BNs0$j!7_uhDcoo{gBNNCB!j|*LAettqaoFu zpvV~}8O@LvUo{F3i+DpgldpiAUEEfgv5^;+Mv794^K(i|GV}9_<3Yt)aYmvG~=6s!)a2g6=u zNzEEgc5zo_lr{sxvqh!kz_UNIoQSBl^Giqv3ne*6qKpK zu7-G>lQ`=^y71T!lGbeWWM>ywR%UF91m_(jOOTixQ2QYH2T1~ygK#ua5kUvC2f0Q; z$e^`Y!3M)34JkLm(+Rx#1XYG8RZ(V&CYNR)8=JVcETZua&fB1tUrJ^QjLi=93OuR8 zBtS6?3M?2O(t!12WfRwwWlV)d4@@>bvjE0q!)an>0jhzS1)3o&Y~s4IjJX)*fdUC; zA}dZ4L8?&A1c_)SFtdr9$|Bl=FoWU~OG*-xGg9HcXTfPQOeL!6Fj37$MMidUSy{#= zQE)PWSpcJ%pyomn2uu`|I*_6mrNIJnH*%uLEI{VL>{W2`_xEvi1ov|AG(rh9vcmT(GVC7 zfzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4FNb9?f=7rVw5o&0;3@?8UmvsFd71*Aut*O zqaiRF0;3@?8UmvsFd72GHUvid|HC$FM?E$g0;3@?8UmvsFd71*Aut*OqaiRF0;3@? z8UmvsFd72z5E#Ax4;~bwjL{Gn4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5E!;0 zFgpJ~Y@>G6W1}H38UmvsFd71*Aut*OqaiRF0;3@?8UmvsFd71*Apj47(f&U?C`K8h nAut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiRF0;3@?Y(oG5zzy9P diff --git a/pkgs/clan-cli/clan_cli/webui/sql_crud.py b/pkgs/clan-cli/clan_cli/webui/sql_crud.py index f18bc4e..7314f23 100644 --- a/pkgs/clan-cli/clan_cli/webui/sql_crud.py +++ b/pkgs/clan-cli/clan_cli/webui/sql_crud.py @@ -64,7 +64,7 @@ def get_services_without_entity_id( # # ######################### def create_entity(db: Session, entity: schemas.EntityCreate) -> sql_models.Entity: - db_entity = sql_models.Entity(**entity.dict(), attached=False) + db_entity = sql_models.Entity(**entity.dict(), attached=False, stop_health_task=False) db.add(db_entity) db.commit() db.refresh(db_entity) @@ -100,20 +100,35 @@ def get_attached_entities( # Returns same entity if setting didnt changed something -def set_attached_by_entity_did( - db: Session, entity_did: str, value: bool -) -> sql_models.Entity: +def stop_entity_health_task( + db: Session, entity_did: str +) -> None: db_entity = get_entity_by_did(db, entity_did) if db_entity is None: raise ClanError(f"Entity with did '{entity_did}' not found") - setattr(db_entity, "attached", value) + setattr(db_entity, "stop_health_task", True) + + # save changes in db + db.add(db_entity) + db.commit() + db.refresh(db_entity) + + + +def set_attached_by_entity_did( + db: Session, entity_did: str, attached: bool +) -> None: + db_entity = get_entity_by_did(db, entity_did) + if db_entity is None: + raise ClanError(f"Entity with did '{entity_did}' not found") + + setattr(db_entity, "attached", attached) # save changes in db db.add(db_entity) db.commit() db.refresh(db_entity) - return db_entity def delete_entity_by_did(db: Session, did: str) -> None: diff --git a/pkgs/clan-cli/clan_cli/webui/sql_models.py b/pkgs/clan-cli/clan_cli/webui/sql_models.py index b0358ce..792b8cc 100644 --- a/pkgs/clan-cli/clan_cli/webui/sql_models.py +++ b/pkgs/clan-cli/clan_cli/webui/sql_models.py @@ -23,6 +23,7 @@ class Entity(Base): ip = Column(String, 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. diff --git a/pkgs/clan-cli/clan_cli/webui/tags.py b/pkgs/clan-cli/clan_cli/webui/tags.py index 034beb7..712f09b 100644 --- a/pkgs/clan-cli/clan_cli/webui/tags.py +++ b/pkgs/clan-cli/clan_cli/webui/tags.py @@ -4,7 +4,6 @@ from typing import Any, Dict, List class Tags(Enum): services = "services" - clients = "clients" entities = "entities" repositories = "repositories" resolutions = "resolution" @@ -18,10 +17,6 @@ tags_metadata: List[Dict[str, Any]] = [ "name": str(Tags.services), "description": "Operations on a service.", }, - { - "name": str(Tags.clients), - "description": "Operations on a client.", - }, { "name": str(Tags.entities), "description": "Operations on an entity.", diff --git a/pkgs/clan-cli/emulate_entity.sh b/pkgs/clan-cli/emulate_entity.sh index da91b78..b4fdbc8 100755 --- a/pkgs/clan-cli/emulate_entity.sh +++ b/pkgs/clan-cli/emulate_entity.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -while true ; do printf 'HTTP/1.1 200 OK\r\n\r\ncool, thanks' | nc -l -N 127.0.0.1 5555 ; done +while true ; do printf 'HTTP/1.1 200 OK\r\n\r\ncool, thanks' | nc -l -N 127.0.0.1 7002 ; done diff --git a/pkgs/clan-cli/tests/openapi_client/__init__.py b/pkgs/clan-cli/tests/openapi_client/__init__.py index 638483e..8263f8b 100644 --- a/pkgs/clan-cli/tests/openapi_client/__init__.py +++ b/pkgs/clan-cli/tests/openapi_client/__init__.py @@ -42,7 +42,6 @@ from openapi_client.models.machine import Machine from openapi_client.models.resolution import Resolution from openapi_client.models.service import Service from openapi_client.models.service_create import ServiceCreate -from openapi_client.models.services_by_name import ServicesByName from openapi_client.models.status import Status from openapi_client.models.validation_error import ValidationError from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/pkgs/clan-cli/tests/openapi_client/api/entities_api.py b/pkgs/clan-cli/tests/openapi_client/api/entities_api.py index 51f4345..debd9c3 100644 --- a/pkgs/clan-cli/tests/openapi_client/api/entities_api.py +++ b/pkgs/clan-cli/tests/openapi_client/api/entities_api.py @@ -46,7 +46,7 @@ class EntitiesApi: self.api_client = api_client @validate_arguments - def attach_entity(self, entity_did : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> Dict[str, str]: # noqa: E501 + def attach_entity(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> Dict[str, str]: # noqa: E501 """Attach Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -55,7 +55,7 @@ class EntitiesApi: >>> thread = api.attach_entity(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param skip: :type skip: int @@ -79,7 +79,7 @@ class EntitiesApi: return self.attach_entity_with_http_info(entity_did, skip, limit, **kwargs) # noqa: E501 @validate_arguments - def attach_entity_with_http_info(self, entity_did : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 + def attach_entity_with_http_info(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 """Attach Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -88,7 +88,7 @@ class EntitiesApi: >>> thread = api.attach_entity_with_http_info(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param skip: :type skip: int @@ -152,12 +152,12 @@ class EntitiesApi: # process the path parameters _path_params = {} - if _params['entity_did']: - _path_params['entity_did'] = _params['entity_did'] - # process the query parameters _query_params = [] + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) + if _params.get('skip') is not None: # noqa: E501 _query_params.append(('skip', _params['skip'])) @@ -184,7 +184,7 @@ class EntitiesApi: } return self.api_client.call_api( - '/api/v1/{entity_did}/attach', 'POST', + '/api/v1/attach', 'POST', _path_params, _query_params, _header_params, @@ -347,7 +347,7 @@ class EntitiesApi: _request_auth=_params.get('_request_auth')) @validate_arguments - def delete_entity(self, entity_did : StrictStr, **kwargs) -> Dict[str, str]: # noqa: E501 + def delete_entity(self, entity_did : Optional[StrictStr] = None, **kwargs) -> Dict[str, str]: # noqa: E501 """Delete Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -356,7 +356,7 @@ class EntitiesApi: >>> thread = api.delete_entity(entity_did, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -376,7 +376,7 @@ class EntitiesApi: return self.delete_entity_with_http_info(entity_did, **kwargs) # noqa: E501 @validate_arguments - def delete_entity_with_http_info(self, entity_did : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + def delete_entity_with_http_info(self, entity_did : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 """Delete Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -385,7 +385,7 @@ class EntitiesApi: >>> thread = api.delete_entity_with_http_info(entity_did, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -443,12 +443,12 @@ class EntitiesApi: # process the path parameters _path_params = {} - if _params['entity_did']: - _path_params['entity_did'] = _params['entity_did'] - # process the query parameters _query_params = [] + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) + # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters @@ -469,7 +469,7 @@ class EntitiesApi: } return self.api_client.call_api( - '/api/v1/{entity_did}/entity', 'DELETE', + '/api/v1/entity', 'DELETE', _path_params, _query_params, _header_params, @@ -486,7 +486,7 @@ class EntitiesApi: _request_auth=_params.get('_request_auth')) @validate_arguments - def detach_entity(self, entity_did : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> Entity: # noqa: E501 + def detach_entity(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> Entity: # noqa: E501 """Detach Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -495,7 +495,7 @@ class EntitiesApi: >>> thread = api.detach_entity(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param skip: :type skip: int @@ -519,7 +519,7 @@ class EntitiesApi: return self.detach_entity_with_http_info(entity_did, skip, limit, **kwargs) # noqa: E501 @validate_arguments - def detach_entity_with_http_info(self, entity_did : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 + def detach_entity_with_http_info(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 """Detach Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -528,7 +528,7 @@ class EntitiesApi: >>> thread = api.detach_entity_with_http_info(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param skip: :type skip: int @@ -592,12 +592,12 @@ class EntitiesApi: # process the path parameters _path_params = {} - if _params['entity_did']: - _path_params['entity_did'] = _params['entity_did'] - # process the query parameters _query_params = [] + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) + if _params.get('skip') is not None: # noqa: E501 _query_params.append(('skip', _params['skip'])) @@ -624,7 +624,7 @@ class EntitiesApi: } return self.api_client.call_api( - '/api/v1/{entity_did}/detach', 'POST', + '/api/v1/detach', 'POST', _path_params, _query_params, _header_params, @@ -935,7 +935,7 @@ class EntitiesApi: _request_auth=_params.get('_request_auth')) @validate_arguments - def get_entity_by_did(self, entity_did : StrictStr, **kwargs) -> Entity: # noqa: E501 + def get_entity_by_did(self, entity_did : Optional[StrictStr] = None, **kwargs) -> Entity: # noqa: E501 """Get Entity By Did # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -944,7 +944,7 @@ class EntitiesApi: >>> thread = api.get_entity_by_did(entity_did, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -964,7 +964,7 @@ class EntitiesApi: return self.get_entity_by_did_with_http_info(entity_did, **kwargs) # noqa: E501 @validate_arguments - def get_entity_by_did_with_http_info(self, entity_did : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + def get_entity_by_did_with_http_info(self, entity_did : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 """Get Entity By Did # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -973,7 +973,7 @@ class EntitiesApi: >>> thread = api.get_entity_by_did_with_http_info(entity_did, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -1031,12 +1031,12 @@ class EntitiesApi: # process the path parameters _path_params = {} - if _params['entity_did']: - _path_params['entity_did'] = _params['entity_did'] - # process the query parameters _query_params = [] + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) + # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters @@ -1057,7 +1057,7 @@ class EntitiesApi: } return self.api_client.call_api( - '/api/v1/{entity_did}/entity', 'GET', + '/api/v1/entity', 'GET', _path_params, _query_params, _header_params, diff --git a/pkgs/clan-cli/tests/openapi_client/api/services_api.py b/pkgs/clan-cli/tests/openapi_client/api/services_api.py index 4c17330..d8eb462 100644 --- a/pkgs/clan-cli/tests/openapi_client/api/services_api.py +++ b/pkgs/clan-cli/tests/openapi_client/api/services_api.py @@ -24,7 +24,6 @@ from typing import Any, List, Optional, Dict from openapi_client.models.service import Service from openapi_client.models.service_create import ServiceCreate -from openapi_client.models.services_by_name import ServicesByName from openapi_client.api_client import ApiClient from openapi_client.api_response import ApiResponse @@ -193,7 +192,7 @@ class ServicesApi: _request_auth=_params.get('_request_auth')) @validate_arguments - def delete_service(self, entity_did : StrictStr, **kwargs) -> Dict[str, str]: # noqa: E501 + def delete_service(self, entity_did : Optional[StrictStr] = None, **kwargs) -> Dict[str, str]: # noqa: E501 """Delete Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -202,7 +201,7 @@ class ServicesApi: >>> thread = api.delete_service(entity_did, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -222,7 +221,7 @@ class ServicesApi: return self.delete_service_with_http_info(entity_did, **kwargs) # noqa: E501 @validate_arguments - def delete_service_with_http_info(self, entity_did : StrictStr, **kwargs) -> ApiResponse: # noqa: E501 + def delete_service_with_http_info(self, entity_did : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 """Delete Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -231,7 +230,7 @@ class ServicesApi: >>> thread = api.delete_service_with_http_info(entity_did, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -289,12 +288,12 @@ class ServicesApi: # process the path parameters _path_params = {} - if _params['entity_did']: - _path_params['entity_did'] = _params['entity_did'] - # process the query parameters _query_params = [] + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) + # process the header parameters _header_params = dict(_params.get('_headers', {})) # process the form parameters @@ -315,7 +314,7 @@ class ServicesApi: } return self.api_client.call_api( - '/api/v1/{entity_did}/service', 'DELETE', + '/api/v1/service', 'DELETE', _path_params, _query_params, _header_params, @@ -479,7 +478,7 @@ class ServicesApi: _request_auth=_params.get('_request_auth')) @validate_arguments - def get_service_by_did(self, entity_did : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> List[Service]: # noqa: E501 + def get_service_by_did(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> List[Service]: # noqa: E501 """Get Service By Did # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -488,7 +487,7 @@ class ServicesApi: >>> thread = api.get_service_by_did(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param skip: :type skip: int @@ -512,7 +511,7 @@ class ServicesApi: return self.get_service_by_did_with_http_info(entity_did, skip, limit, **kwargs) # noqa: E501 @validate_arguments - def get_service_by_did_with_http_info(self, entity_did : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 + def get_service_by_did_with_http_info(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 """Get Service By Did # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -521,7 +520,7 @@ class ServicesApi: >>> thread = api.get_service_by_did_with_http_info(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_did: (required) + :param entity_did: :type entity_did: str :param skip: :type skip: int @@ -585,12 +584,12 @@ class ServicesApi: # process the path parameters _path_params = {} - if _params['entity_did']: - _path_params['entity_did'] = _params['entity_did'] - # process the query parameters _query_params = [] + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) + if _params.get('skip') is not None: # noqa: E501 _query_params.append(('skip', _params['skip'])) @@ -617,7 +616,7 @@ class ServicesApi: } return self.api_client.call_api( - '/api/v1/{entity_did}/service', 'GET', + '/api/v1/service', 'GET', _path_params, _query_params, _header_params, @@ -634,17 +633,17 @@ class ServicesApi: _request_auth=_params.get('_request_auth')) @validate_arguments - def get_services_by_name(self, entity_name : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ServicesByName: # noqa: E501 - """Get Services By Name # noqa: E501 + def get_services_without_entity(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> List[Service]: # noqa: E501 + """Get Services Without Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_services_by_name(entity_name, skip, limit, async_req=True) + >>> thread = api.get_services_without_entity(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_name: (required) - :type entity_name: str + :param entity_did: + :type entity_did: str :param skip: :type skip: int :param limit: @@ -658,26 +657,26 @@ class ServicesApi: :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: ServicesByName + :rtype: List[Service] """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - message = "Error! Please call the get_services_by_name_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + message = "Error! Please call the get_services_without_entity_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return self.get_services_by_name_with_http_info(entity_name, skip, limit, **kwargs) # noqa: E501 + return self.get_services_without_entity_with_http_info(entity_did, skip, limit, **kwargs) # noqa: E501 @validate_arguments - def get_services_by_name_with_http_info(self, entity_name : StrictStr, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 - """Get Services By Name # noqa: E501 + def get_services_without_entity_with_http_info(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Get Services Without Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_services_by_name_with_http_info(entity_name, skip, limit, async_req=True) + >>> thread = api.get_services_without_entity_with_http_info(entity_did, skip, limit, async_req=True) >>> result = thread.get() - :param entity_name: (required) - :type entity_name: str + :param entity_did: + :type entity_did: str :param skip: :type skip: int :param limit: @@ -704,13 +703,13 @@ class ServicesApi: :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(ServicesByName, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(List[Service], status_code(int), headers(HTTPHeaderDict)) """ _params = locals() _all_params = [ - 'entity_name', + 'entity_did', 'skip', 'limit' ] @@ -731,7 +730,7 @@ class ServicesApi: if _key not in _all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_services_by_name" % _key + " to method get_services_without_entity" % _key ) _params[_key] = _val del _params['kwargs'] @@ -743,8 +742,8 @@ class ServicesApi: # process the query parameters _query_params = [] - if _params.get('entity_name') is not None: # noqa: E501 - _query_params.append(('entity_name', _params['entity_name'])) + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) if _params.get('skip') is not None: # noqa: E501 _query_params.append(('skip', _params['skip'])) @@ -767,12 +766,12 @@ class ServicesApi: _auth_settings = [] # noqa: E501 _response_types_map = { - '200': "ServicesByName", + '200': "List[Service]", '422': "HTTPValidationError", } return self.api_client.call_api( - '/api/v1/services_by_entity_name', 'GET', + '/api/v1/services_without_entity', 'GET', _path_params, _query_params, _header_params, 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 86785f9..2264f33 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 -| Method | HTTP request | Description | -| ----------------------------------------------------------------- | -------------------------------------- | --------------------- | -| [**attach_entity**](EntitiesApi.md#attach_entity) | **POST** /api/v1/{entity_did}/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_did}/entity | Delete Entity | -| [**detach_entity**](EntitiesApi.md#detach_entity) | **POST** /api/v1/{entity_did}/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_did}/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 | # **attach_entity** - -> Dict[str, str] attach_entity(entity_did, skip=skip, limit=limit) +> Dict[str, str] attach_entity(entity_did=entity_did, skip=skip, limit=limit) Attach Entity @@ -39,26 +39,28 @@ 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_did = 'entity_did_example' # str | + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') skip = 0 # int | (optional) (default to 0) limit = 100 # int | (optional) (default to 100) try: # Attach Entity - api_response = api_instance.attach_entity(entity_did, skip=skip, limit=limit) + api_response = api_instance.attach_entity(entity_did=entity_did, skip=skip, limit=limit) print("The response of EntitiesApi->attach_entity:\n") pprint(api_response) except Exception as e: print("Exception when calling EntitiesApi->attach_entity: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| -------------- | ------- | ----------- | --------------------------- | -| **entity_did** | **str** | | -| **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 @@ -70,20 +72,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 @@ -110,7 +110,7 @@ configuration = openapi_client.Configuration( with openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = openapi_client.EntitiesApi(api_client) - entity_create = openapi_client.EntityCreate() # EntityCreate | + entity_create = openapi_client.EntityCreate() # EntityCreate | try: # Create Entity @@ -121,11 +121,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 @@ -137,21 +139,19 @@ 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) +> Dict[str, str] delete_entity(entity_did=entity_did) Delete Entity @@ -175,22 +175,24 @@ 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_did = 'entity_did_example' # str | + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') try: # Delete Entity - api_response = api_instance.delete_entity(entity_did) + api_response = api_instance.delete_entity(entity_did=entity_did) print("The response of EntitiesApi->delete_entity:\n") pprint(api_response) except Exception as e: print("Exception when calling EntitiesApi->delete_entity: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| -------------- | ------- | ----------- | ----- | -| **entity_did** | **str** | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity_did** | **str**| | [optional] [default to 'did:sov:test:1234'] ### Return type @@ -202,21 +204,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 | - | -| **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** - -> Entity detach_entity(entity_did, skip=skip, limit=limit) +> Entity detach_entity(entity_did=entity_did, skip=skip, limit=limit) Detach Entity @@ -241,26 +241,28 @@ 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_did = 'entity_did_example' # str | + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') skip = 0 # int | (optional) (default to 0) limit = 100 # int | (optional) (default to 100) try: # Detach Entity - api_response = api_instance.detach_entity(entity_did, skip=skip, limit=limit) + api_response = api_instance.detach_entity(entity_did=entity_did, skip=skip, limit=limit) print("The response of EntitiesApi->detach_entity:\n") pprint(api_response) except Exception as e: print("Exception when calling EntitiesApi->detach_entity: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| -------------- | ------- | ----------- | --------------------------- | -| **entity_did** | **str** | | -| **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,21 +410,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 | - | -| **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 get_entity_by_did(entity_did=entity_did) Get Entity By Did @@ -447,22 +447,24 @@ 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_did = 'entity_did_example' # str | + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') try: # Get Entity By Did - api_response = api_instance.get_entity_by_did(entity_did) + api_response = api_instance.get_entity_by_did(entity_did=entity_did) print("The response of EntitiesApi->get_entity_by_did:\n") pprint(api_response) except Exception as e: print("Exception when calling EntitiesApi->get_entity_by_did: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| -------------- | ------- | ----------- | ----- | -| **entity_did** | **str** | | +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,14 +542,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 fc0e2d7..18c6174 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md @@ -1,15 +1,15 @@ # Entity -## Properties -| Name | Type | Description | Notes | -| ------------ | ---------- | ----------- | ----- | -| **did** | **str** | | -| **name** | **str** | | -| **ip** | **str** | | -| **visible** | **bool** | | -| **other** | **object** | | -| **attached** | **bool** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**did** | **str** | | +**name** | **str** | | +**ip** | **str** | | +**visible** | **bool** | | +**other** | **object** | | +**attached** | **bool** | | ## Example @@ -28,5 +28,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..7cd1831 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md @@ -1,14 +1,14 @@ # 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** | | +**visible** | **bool** | | +**other** | **object** | | ## Example @@ -27,5 +27,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/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 846a81c..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/{entity_did}/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/{entity_did}/service | Get Service By Did | -| [**get_services_by_name**](ServicesApi.md#get_services_by_name) | **GET** /api/v1/services_by_entity_name | Get Services By Name | # **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,21 +67,19 @@ 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) +> Dict[str, str] delete_service(entity_did=entity_did) Delete Service @@ -103,22 +103,24 @@ 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) - entity_did = 'entity_did_example' # str | + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') try: # Delete Service - api_response = api_instance.delete_service(entity_did) + api_response = api_instance.delete_service(entity_did=entity_did) print("The response of ServicesApi->delete_service:\n") pprint(api_response) except Exception as e: print("Exception when calling ServicesApi->delete_service: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| -------------- | ------- | ----------- | ----- | -| **entity_did** | **str** | | +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,21 +200,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 | - | -| **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, skip=skip, limit=limit) +> List[Service] get_service_by_did(entity_did=entity_did, skip=skip, limit=limit) Get Service By Did @@ -237,26 +237,28 @@ 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) - entity_did = 'entity_did_example' # str | + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') skip = 0 # int | (optional) (default to 0) limit = 100 # int | (optional) (default to 100) try: # Get Service By Did - api_response = api_instance.get_service_by_did(entity_did, skip=skip, limit=limit) + api_response = api_instance.get_service_by_did(entity_did=entity_did, skip=skip, limit=limit) print("The response of ServicesApi->get_service_by_did:\n") pprint(api_response) except Exception as e: print("Exception when calling ServicesApi->get_service_by_did: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| -------------- | ------- | ----------- | --------------------------- | -| **entity_did** | **str** | | -| **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,23 +270,21 @@ 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_by_name** +# **get_services_without_entity** +> List[Service] get_services_without_entity(entity_did=entity_did, skip=skip, limit=limit) -> ServicesByName get_services_by_name(entity_name, skip=skip, limit=limit) - -Get Services By Name +Get Services Without Entity ### Example @@ -292,7 +292,7 @@ Get Services By Name import time import os import openapi_client -from openapi_client.models.services_by_name import ServicesByName +from openapi_client.models.service import Service from openapi_client.rest import ApiException from pprint import pprint @@ -307,30 +307,32 @@ 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) - entity_name = 'entity_name_example' # str | + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') skip = 0 # int | (optional) (default to 0) limit = 100 # int | (optional) (default to 100) try: - # Get Services By Name - api_response = api_instance.get_services_by_name(entity_name, skip=skip, limit=limit) - print("The response of ServicesApi->get_services_by_name:\n") + # Get Services Without Entity + api_response = api_instance.get_services_without_entity(entity_did=entity_did, skip=skip, limit=limit) + print("The response of ServicesApi->get_services_without_entity:\n") pprint(api_response) except Exception as e: - print("Exception when calling ServicesApi->get_services_by_name: %s\n" % e) + print("Exception when calling ServicesApi->get_services_without_entity: %s\n" % e) ``` + + ### Parameters -| Name | Type | Description | Notes | -| --------------- | ------- | ----------- | --------------------------- | -| **entity_name** | **str** | | -| **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 -[**ServicesByName**](ServicesByName.md) +[**List[Service]**](Service.md) ### Authorization @@ -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/ServicesByName.md b/pkgs/clan-cli/tests/openapi_client/docs/ServicesByName.md deleted file mode 100644 index 5d25b1e..0000000 --- a/pkgs/clan-cli/tests/openapi_client/docs/ServicesByName.md +++ /dev/null @@ -1,28 +0,0 @@ -# ServicesByName - -## Properties - -| Name | Type | Description | Notes | -| ------------ | ------------------------------- | ----------- | ----- | -| **entity** | [**Entity**](Entity.md) | | -| **services** | [**List[Service]**](Service.md) | | - -## Example - -```python -from openapi_client.models.services_by_name import ServicesByName - -# TODO update the JSON string below -json = "{}" -# create an instance of ServicesByName from a JSON string -services_by_name_instance = ServicesByName.from_json(json) -# print the JSON string representation of the object -print ServicesByName.to_json() - -# convert the object into a dict -services_by_name_dict = services_by_name_instance.to_dict() -# create an instance of ServicesByName from a dict -services_by_name_form_dict = services_by_name.from_dict(services_by_name_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/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 822cc4e..4955602 100644 --- a/pkgs/clan-cli/tests/openapi_client/models/__init__.py +++ b/pkgs/clan-cli/tests/openapi_client/models/__init__.py @@ -21,7 +21,6 @@ from openapi_client.models.machine import Machine from openapi_client.models.resolution import Resolution from openapi_client.models.service import Service from openapi_client.models.service_create import ServiceCreate -from openapi_client.models.services_by_name import ServicesByName from openapi_client.models.status import Status from openapi_client.models.validation_error import ValidationError from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner diff --git a/pkgs/clan-cli/tests/openapi_client/models/services_by_name.py b/pkgs/clan-cli/tests/openapi_client/models/services_by_name.py deleted file mode 100644 index 0ee9a85..0000000 --- a/pkgs/clan-cli/tests/openapi_client/models/services_by_name.py +++ /dev/null @@ -1,85 +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 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, conlist -from openapi_client.models.entity import Entity -from openapi_client.models.service import Service - -class ServicesByName(BaseModel): - """ - ServicesByName - """ - entity: Entity = Field(...) - services: conlist(Service) = Field(...) - __properties = ["entity", "services"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ServicesByName: - """Create an instance of ServicesByName from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of entity - if self.entity: - _dict['entity'] = self.entity.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in services (list) - _items = [] - if self.services: - for _item in self.services: - if _item: - _items.append(_item.to_dict()) - _dict['services'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ServicesByName: - """Create an instance of ServicesByName from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ServicesByName.parse_obj(obj) - - _obj = ServicesByName.parse_obj({ - "entity": Entity.from_dict(obj.get("entity")) if obj.get("entity") is not None else None, - "services": [Service.from_dict(_item) for _item in obj.get("services")] if obj.get("services") is not None else None - }) - return _obj - - diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_services_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_services_api.py index b9d196d..68470f9 100644 --- a/pkgs/clan-cli/tests/openapi_client/test/test_services_api.py +++ b/pkgs/clan-cli/tests/openapi_client/test/test_services_api.py @@ -54,10 +54,10 @@ class TestServicesApi(unittest.TestCase): """ pass - def test_get_services_by_name(self) -> None: - """Test case for get_services_by_name + def test_get_services_without_entity(self) -> None: + """Test case for get_services_without_entity - Get Services By Name # noqa: E501 + Get Services Without Entity # noqa: E501 """ pass diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_services_by_name.py b/pkgs/clan-cli/tests/openapi_client/test/test_services_by_name.py deleted file mode 100644 index b63992b..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_services_by_name.py +++ /dev/null @@ -1,99 +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.services_by_name import ServicesByName # noqa: E501 - -class TestServicesByName(unittest.TestCase): - """ServicesByName unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ServicesByName: - """Test ServicesByName - 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 `ServicesByName` - """ - model = ServicesByName() # noqa: E501 - if include_optional: - return ServicesByName( - entity = openapi_client.models.entity.Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, ), - services = [ - openapi_client.models.service.Service( - 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', - entity = openapi_client.models.entity.Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, ), ) - ] - ) - else: - return ServicesByName( - entity = openapi_client.models.entity.Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, ), - services = [ - openapi_client.models.service.Service( - 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', - entity = openapi_client.models.entity.Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, ), ) - ], - ) - """ - - def testServicesByName(self): - """Test ServicesByName""" - # 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/ui/src/app/access-point/page.tsx b/pkgs/ui/src/app/access-point/page.tsx index 34f08cd..c4783f0 100644 --- a/pkgs/ui/src/app/access-point/page.tsx +++ b/pkgs/ui/src/app/access-point/page.tsx @@ -45,7 +45,7 @@ export default function AccessPoint() { useEffect(() => { const interval = setInterval(() => { onRefresh(); - }, 1000); + }, 5000); return () => clearInterval(interval); // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/pkgs/ui/src/app/client/[client_name]/page.tsx b/pkgs/ui/src/app/client/[client_name]/page.tsx index 2637d81..4b4e68a 100644 --- a/pkgs/ui/src/app/client/[client_name]/page.tsx +++ b/pkgs/ui/src/app/client/[client_name]/page.tsx @@ -10,13 +10,112 @@ import { CardHeader, Snackbar, Typography, + CircularProgress, + IconButton, } from "@mui/material"; import CopyToClipboard from "@/components/copy_to_clipboard"; -import { useGetServicesByName } from "@/api/services/services"; -import { attachEntity, detachEntity } from "@/api/entities/entities"; +import { + attachEntity, + detachEntity, + isAttached, +} from "@/api/entities/entities"; import { mutate } from "swr"; import { Skeleton } from "@mui/material"; -import { Service } from "@/api/model"; +import { Entity, Service } from "@/api/model"; +import useGetEntityByNameOrDid from "@/components/hooks/useGetEntityByNameOrDid"; +import { useGetAllServices } from "@/api/services/services"; +import axios from "axios"; +import { NoDataOverlay } from "@/components/noDataOverlay"; +import { DashboardCard } from "@/components/card"; +import CloseIcon from "@mui/icons-material/Close"; + +interface SnackMessage { + message: string; + severity: "success" | "error"; +} + +export const RecentActivity = (entity: Entity) => { + return ( + +
+ +
+
+ ); +}; + +type AttachButtonProps = { + entity?: Entity; + setSnackbarMessage: (message: SnackMessage) => void; + setSnackbarOpen: (open: boolean) => void; +}; + +const AttachButton = ({ + entity, + setSnackbarMessage, + setSnackbarOpen, +}: AttachButtonProps) => { + const [loading, setLoading] = useState(false); + + const handleClick = async () => { + setLoading(true); + // Call the attach or detach function depending on the isAttached value + // and await for the result + try { + let response = await (entity?.attached + ? detachEntity({ entity_did: entity?.did }) + : attachEntity({ entity_did: entity?.did })); + + if (!entity?.attached) { + console.log("calling isAttached"); + response = await isAttached({ entity_did: entity?.did }); + console.log("response: ", response); + } + const msg = { + message: response.data.message, + severity: "success", + } as SnackMessage; + setSnackbarMessage(msg); + setSnackbarOpen(true); + } catch (error) { + if (axios.isAxiosError(error)) { + // Extract the error message from the error object + const errorMessage = error.response?.data.detail[0].msg; + + const msg = { + message: `${errorMessage}`, + severity: "error", + } as SnackMessage; + setSnackbarMessage(msg); + setSnackbarOpen(true); + } else { + console.error("error: ", error); + } + } finally { + setLoading(false); + } + }; + + return ( + <> + + + ); +}; export default function Client({ params, @@ -25,18 +124,16 @@ export default function Client({ }) { const { client_name } = params; + const { entity: entity } = useGetEntityByNameOrDid(client_name); const { data: services, isLoading: services_loading, swrKey: entityKeyFunc, - } = useGetServicesByName({ - entity_name: client_name, - }); + } = useGetAllServices(); - const entity = services?.data?.entity; const clients: Service[] = useMemo(() => { - if (services?.data?.services) { - return services.data.services.filter((service) => { + if (services?.data) { + return services.data.filter((service) => { if (service.entity_did !== entity?.did) return true; }); } @@ -60,47 +157,15 @@ export default function Client({ const cardContentRef = useRef(null); const [snackbarOpen, setSnackbarOpen] = useState(false); - const [snackbarMessage, setSnackbarMessage] = useState(""); - const [isAttached, setIsAttached] = useState(entity?.attached); + const [snackbarMessage, setSnackbarMessage] = useState< + SnackMessage | undefined + >(undefined); const closeSnackBar = () => { - setSnackbarMessage(""); + setSnackbarMessage(undefined); setSnackbarOpen(false); }; - const onAttachEntity = async () => { - try { - if (entity) { - const response = await attachEntity(entity.did); - setSnackbarMessage(response.data.message); - setSnackbarOpen(true); - } else { - console.error("no entity"); - } - } catch (error) { - console.error(error); - } finally { - setIsAttached(true); - } - }; - - const onDetachEntity = async () => { - try { - if (entity) { - const response = await detachEntity(entity.did); - console.log(response); - setSnackbarMessage("Entity detached successfully."); - setSnackbarOpen(true); - } else { - console.error("no entity"); - } - } catch (error) { - console.error(error); - } finally { - setIsAttached(false); - } - }; - if (services_loading) return ; if (!services) return Client not found; @@ -113,25 +178,13 @@ export default function Client({ justifyContent: "space-between", }} > -

Client 1

+

Entity {entity?.name}

- {isAttached === false ? ( - - ) : ( - - )} +
diff --git a/pkgs/ui/src/components/hooks/useGetEntityById.tsx b/pkgs/ui/src/components/hooks/useGetEntityByNameOrDid.tsx similarity index 80% rename from pkgs/ui/src/components/hooks/useGetEntityById.tsx rename to pkgs/ui/src/components/hooks/useGetEntityByNameOrDid.tsx index 7736d44..79ee222 100644 --- a/pkgs/ui/src/components/hooks/useGetEntityById.tsx +++ b/pkgs/ui/src/components/hooks/useGetEntityByNameOrDid.tsx @@ -1,7 +1,7 @@ import { useContext } from "react"; import { AppContext } from "./useAppContext"; -const useGetEntityByName = (nameOrDid: string) => { +const useGetEntityByNameOrDid = (nameOrDid: string) => { const { data } = useContext(AppContext); const allEntities = data.allEntities; @@ -16,4 +16,4 @@ const useGetEntityByName = (nameOrDid: string) => { return { entity, isLoading: false }; }; -export default useGetEntityByName; +export default useGetEntityByNameOrDid; diff --git a/pkgs/ui/src/components/table/index.tsx b/pkgs/ui/src/components/table/index.tsx index 425606e..900b65c 100644 --- a/pkgs/ui/src/components/table/index.tsx +++ b/pkgs/ui/src/components/table/index.tsx @@ -36,7 +36,6 @@ const CustomTable = ({ configuration, data, loading, tkey }: ICustomTable) => { // cover use case if we want to render a component if (render) renderedValue = render(value); - console.log("renderTableCell key", cellKey); return ( {renderedValue} diff --git a/pkgs/ui/src/config/client_1/index.tsx b/pkgs/ui/src/config/client_1/index.tsx index b91cd4e..3a1db60 100644 --- a/pkgs/ui/src/config/client_1/index.tsx +++ b/pkgs/ui/src/config/client_1/index.tsx @@ -71,7 +71,6 @@ export const ServiceTableConfig = [ ))} ); - console.log("render", renderedValue); return renderedValue; }, }, -- 2.51.0 From 5f4eb1f521bf522aebd80d13cd600d2a98603e14 Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 19:33:29 +0100 Subject: [PATCH 2/8] Fixed background task not stopping on detach --- pkgs/clan-cli/clan_cli/webui/app.py | 1 + .../clan_cli/webui/routers/endpoints.py | 135 +++++------ pkgs/clan-cli/clan_cli/webui/sql_crud.py | 15 +- pkgs/clan-cli/emulate_entity.sh | 2 +- .../tests/openapi_client/docs/DefaultApi.md | 68 +++--- .../tests/openapi_client/docs/EntitiesApi.md | 216 +++++++++--------- .../tests/openapi_client/docs/Entity.md | 21 +- .../tests/openapi_client/docs/EntityCreate.md | 19 +- .../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 +- 19 files changed, 389 insertions(+), 420 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/webui/app.py b/pkgs/clan-cli/clan_cli/webui/app.py index 99d7e9e..8913f72 100644 --- a/pkgs/clan-cli/clan_cli/webui/app.py +++ b/pkgs/clan-cli/clan_cli/webui/app.py @@ -33,6 +33,7 @@ for u in cors_url: # Logging setup log = logging.getLogger(__name__) + @asynccontextmanager async def lifespan(app: FastAPI) -> Any: await socket_manager2.brd.connect() diff --git a/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py b/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py index 9b601aa..625d03b 100644 --- a/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py +++ b/pkgs/clan-cli/clan_cli/webui/routers/endpoints.py @@ -2,7 +2,6 @@ import logging import time from datetime import datetime from typing import List, Optional -import asyncio import httpx from fastapi import APIRouter, BackgroundTasks, Depends @@ -16,7 +15,6 @@ from ..schemas import ( Resolution, Service, ServiceCreate, - ServicesByName, ) from ..tags import Tags @@ -46,9 +44,7 @@ def get_all_services( return services -@router.get( - "/api/v1/service", response_model=List[Service], tags=[Tags.services] -) +@router.get("/api/v1/service", response_model=List[Service], tags=[Tags.services]) def get_service_by_did( entity_did: str = "did:sov:test:1234", skip: int = 0, @@ -73,6 +69,7 @@ def get_services_without_entity( service = sql_crud.get_services_without_entity_id(db, entity_did=entity_did) return service + @router.delete("/api/v1/service", tags=[Tags.services]) def delete_service( entity_did: str = "did:sov:test:1234", @@ -129,9 +126,7 @@ def get_all_entities( return entities -@router.get( - "/api/v1/entity", response_model=Optional[Entity], tags=[Tags.entities] -) +@router.get("/api/v1/entity", response_model=Optional[Entity], tags=[Tags.entities]) def get_entity_by_did( entity_did: str = "did:sov:test:1234", db: Session = Depends(sql_db.get_db), @@ -151,11 +146,44 @@ def get_attached_entities( entities = sql_crud.get_attached_entities(db, skip=skip, limit=limit) return entities + +@router.post("/api/v1/detach", tags=[Tags.entities]) +def detach_entity( + background_tasks: BackgroundTasks, + entity_did: str = "did:sov:test:1234", + skip: int = 0, + limit: int = 100, + db: Session = Depends(sql_db.get_db), +) -> dict[str, str]: + entity = sql_crud.get_entity_by_did(db, did=entity_did) + if entity is None: + raise ClanError(f"Entity with did '{entity_did}' not found") + sql_crud.set_stop_health_task(db, entity_did, True) + return {"message": f"Detached {entity_did} successfully"} + + +@router.post("/api/v1/attach", tags=[Tags.entities]) +def attach_entity( + background_tasks: BackgroundTasks, + entity_did: str = "did:sov:test:1234", + skip: int = 0, + limit: int = 100, + db: Session = Depends(sql_db.get_db), +) -> dict[str, str]: + entity = sql_crud.get_entity_by_did(db, did=entity_did) + if entity is None: + raise ClanError(f"Entity with did '{entity_did}' not found") + url = f"http://{entity.ip}" + sql_crud.set_stop_health_task(db, entity_did, False) + print("Start health query at", url) + background_tasks.add_task(attach_entity_loc, db, entity_did) + return {"message": f"Started attachment task for {entity.name}"} + + @router.get("/api/v1/is_attached", tags=[Tags.entities]) def is_attached( - entity_did: str = "did:sov:test:1234", - db: Session = Depends(sql_db.get_db)) -> dict[str, str]: - + entity_did: str = "did:sov:test:1234", db: Session = Depends(sql_db.get_db) +) -> dict[str, str]: entity = sql_crud.get_entity_by_did(db, did=entity_did) if entity is None: @@ -171,74 +199,35 @@ def is_attached( url = f"http://{entity.ip}" raise ClanError(f"Entity at {url} not reachable") + db.refresh(entity) return {"message": f"Attached to {entity.name} successfully"} +def attach_entity_loc(db: Session, entity_did: str) -> None: + entity = sql_crud.get_entity_by_did(db, did=entity_did) + try: + assert entity is not None + url = f"http://{entity.ip}" -@router.post("/api/v1/detach", tags=[Tags.entities]) -def detach_entity( - background_tasks: BackgroundTasks, - entity_did: str = "did:sov:test:1234", - skip: int = 0, - limit: int = 100, - db: Session = Depends(sql_db.get_db), -) -> dict[str, str]: - sql_crud.stop_entity_health_task(db, entity_did) - return {"message": f"Detached {entity_did} successfully"} - - -@router.post("/api/v1/attach", tags=[Tags.entities]) -def attach_entity( - background_tasks: BackgroundTasks, - entity_did: str = "did:sov:test:1234", - skip: int = 0, - limit: int = 100 -) -> dict[str, str]: - # entity = sql_crud.get_entity_by_did(db, did=entity_did) - # if entity is None: - # raise ClanError(f"Entity with did '{entity_did}' not found") - #url = f"http://{entity.ip}" - #log.info("Start health query at", url) - background_tasks.add_task(attach_entity_loc, entity_did) - return {"message": f"Started attachment task for {entity_did}"} - - -def attach_entity_loc(entity_did: str) -> None: - with sql_db.SessionLocal() as db: - entity = sql_crud.get_entity_by_did(db, did=entity_did) while entity.stop_health_task is False: - entity = sql_crud.get_entity_by_did(db, did=entity_did) - assert entity is not None - log.warning(f"Stop health status task for {entity.stop_health_task}") + response = httpx.get(url, timeout=2) + if response.status_code != 200: + raise ClanError( + f"Entity with did '{entity_did}' returned {response.status_code}" + ) + + if entity.attached is False: + sql_crud.set_attached_by_entity_did(db, entity_did, True) + if entity is None: + raise ClanError(f"Entity with did '{entity_did}' has been deleted") + time.sleep(1) - # entity = sql_crud.get_entity_by_did(db, did=entity_did) - # assert entity is not None - # try: - - # while True: - - - # if entity.stop_health_task: - # print(f"Stop health status task for {entity.name}") - # break - - # url = f"http://{entity.ip}" - # response = httpx.get(url, timeout=2) - # #log.warning(f"Response {response.status_code} from {url}") - # print(f"{entity.name}: stop_health_task: {entity.stop_health_task}") - # if response.status_code != 200: - # raise ClanError(f"Entity with did '{entity_did}' returned {response.status_code}") - - # if entity.attached is False: - # sql_crud.set_attached_by_entity_did(db, entity_did, True) - # if entity is None: - # raise ClanError(f"Entity with did '{entity_did}' has been deleted") - - # time.sleep(1) - # except Exception: - # log.warning(f"Entity {entity_did} not reachable at {url}") - # finally: - # sql_crud.set_attached_by_entity_did(db, entity_did, False) + db.refresh(entity) + except Exception: + print(f"Entity {entity_did} not reachable at {url}") + finally: + sql_crud.set_attached_by_entity_did(db, entity_did, False) + sql_crud.set_stop_health_task(db, entity_did, False) @router.delete("/api/v1/entity", tags=[Tags.entities]) diff --git a/pkgs/clan-cli/clan_cli/webui/sql_crud.py b/pkgs/clan-cli/clan_cli/webui/sql_crud.py index 7314f23..3f5fdc0 100644 --- a/pkgs/clan-cli/clan_cli/webui/sql_crud.py +++ b/pkgs/clan-cli/clan_cli/webui/sql_crud.py @@ -64,7 +64,9 @@ def get_services_without_entity_id( # # ######################### def create_entity(db: Session, entity: schemas.EntityCreate) -> sql_models.Entity: - db_entity = sql_models.Entity(**entity.dict(), attached=False, stop_health_task=False) + db_entity = sql_models.Entity( + **entity.dict(), attached=False, stop_health_task=False + ) db.add(db_entity) db.commit() db.refresh(db_entity) @@ -100,14 +102,12 @@ def get_attached_entities( # Returns same entity if setting didnt changed something -def stop_entity_health_task( - db: Session, entity_did: str -) -> None: +def set_stop_health_task(db: Session, entity_did: str, value: bool) -> None: db_entity = get_entity_by_did(db, entity_did) if db_entity is None: raise ClanError(f"Entity with did '{entity_did}' not found") - setattr(db_entity, "stop_health_task", True) + setattr(db_entity, "stop_health_task", value) # save changes in db db.add(db_entity) @@ -115,10 +115,7 @@ def stop_entity_health_task( db.refresh(db_entity) - -def set_attached_by_entity_did( - db: Session, entity_did: str, attached: bool -) -> None: +def set_attached_by_entity_did(db: Session, entity_did: str, attached: bool) -> None: db_entity = get_entity_by_did(db, entity_did) if db_entity is None: raise ClanError(f"Entity with did '{entity_did}' not found") diff --git a/pkgs/clan-cli/emulate_entity.sh b/pkgs/clan-cli/emulate_entity.sh index b4fdbc8..047880a 100755 --- a/pkgs/clan-cli/emulate_entity.sh +++ b/pkgs/clan-cli/emulate_entity.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -while true ; do printf 'HTTP/1.1 200 OK\r\n\r\ncool, thanks' | nc -l -N 127.0.0.1 7002 ; done +while true ; do printf 'HTTP/1.1 200 OK\r\n\r\ncool, thanks' | nc -l -N 127.0.0.1 7002; done 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 2264f33..ccb0216 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md @@ -1,20 +1,20 @@ # 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 +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 | # **attach_entity** + > Dict[str, str] attach_entity(entity_did=entity_did, skip=skip, limit=limit) Attach Entity @@ -52,15 +52,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 @@ -72,18 +70,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 @@ -110,7 +110,7 @@ configuration = openapi_client.Configuration( with openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = openapi_client.EntitiesApi(api_client) - entity_create = openapi_client.EntityCreate() # EntityCreate | + entity_create = openapi_client.EntityCreate() # EntityCreate | try: # Create Entity @@ -121,13 +121,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 @@ -139,18 +137,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 @@ -186,13 +186,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 @@ -204,18 +202,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** + > Entity 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,14 +540,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 18c6174..fc0e2d7 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md @@ -1,15 +1,15 @@ # Entity - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**did** | **str** | | -**name** | **str** | | -**ip** | **str** | | -**visible** | **bool** | | -**other** | **object** | | -**attached** | **bool** | | + +| Name | Type | Description | Notes | +| ------------ | ---------- | ----------- | ----- | +| **did** | **str** | | +| **name** | **str** | | +| **ip** | **str** | | +| **visible** | **bool** | | +| **other** | **object** | | +| **attached** | **bool** | | ## Example @@ -28,6 +28,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 7cd1831..4fff16a 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md @@ -1,14 +1,14 @@ # EntityCreate - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**did** | **str** | | -**name** | **str** | | -**ip** | **str** | | -**visible** | **bool** | | -**other** | **object** | | + +| Name | Type | Description | Notes | +| ----------- | ---------- | ----------- | ----- | +| **did** | **str** | | +| **name** | **str** | | +| **ip** | **str** | | +| **visible** | **bool** | | +| **other** | **object** | | ## Example @@ -27,6 +27,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/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/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) - - -- 2.51.0 From 2aa7dbcf09077cd9f467604998bc2b985c5f999f Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 19:50:38 +0100 Subject: [PATCH 3/8] Fixing static port for test. Use unused port --- pkgs/clan-cli/tests/api.py | 5 +++-- pkgs/clan-cli/tests/test_db_api.py | 6 ------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/clan-cli/tests/api.py b/pkgs/clan-cli/tests/api.py index c95c1f9..026acf8 100644 --- a/pkgs/clan-cli/tests/api.py +++ b/pkgs/clan-cli/tests/api.py @@ -12,6 +12,7 @@ from openapi_client import ApiClient, Configuration from clan_cli.webui.app import app +from ports import PortFunction @pytest.fixture(scope="session") def test_client() -> TestClient: @@ -31,8 +32,8 @@ def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | # Pytest fixture to run the server in a separate process @pytest.fixture(scope="session") -def server_url() -> Generator[str, None, None]: - port = 8000 +def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: + port = unused_tcp_port() host = "127.0.0.1" proc = Process( target=uvicorn.run, diff --git a/pkgs/clan-cli/tests/test_db_api.py b/pkgs/clan-cli/tests/test_db_api.py index 2bb519d..cf8f479 100644 --- a/pkgs/clan-cli/tests/test_db_api.py +++ b/pkgs/clan-cli/tests/test_db_api.py @@ -26,12 +26,6 @@ def test_health(api_client: ApiClient) -> None: assert res.status == Status.ONLINE -def test_entities_empty(api_client: ApiClient) -> None: - entity = EntitiesApi(api_client=api_client) - res = entity.get_all_entities() - assert res == [] - - def create_entities(num: int = 10) -> list[EntityCreate]: res = [] for i in range(num): -- 2.51.0 From f5b7c38451a8e1237e5f9050b4b652b19aca1436 Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 19:52:11 +0100 Subject: [PATCH 4/8] nix fmt --- pkgs/clan-cli/tests/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/clan-cli/tests/api.py b/pkgs/clan-cli/tests/api.py index 026acf8..1c3644d 100644 --- a/pkgs/clan-cli/tests/api.py +++ b/pkgs/clan-cli/tests/api.py @@ -9,10 +9,10 @@ import pytest import uvicorn from fastapi.testclient import TestClient from openapi_client import ApiClient, Configuration +from ports import PortFunction from clan_cli.webui.app import app -from ports import PortFunction @pytest.fixture(scope="session") def test_client() -> TestClient: -- 2.51.0 From aab8c88fe2ae9b833a7fc942515938c59cd101dd Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 19:58:56 +0100 Subject: [PATCH 5/8] new openapi_client --- .../tests/openapi_client/api/entities_api.py | 147 ++++++++- .../tests/openapi_client/docs/DefaultApi.md | 68 ++--- .../tests/openapi_client/docs/EntitiesApi.md | 287 +++++++++++------- .../tests/openapi_client/docs/Entity.md | 22 +- .../tests/openapi_client/docs/EntityCreate.md | 19 +- .../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/entity.py | 6 +- .../openapi_client/test/test_entities_api.py | 7 + .../tests/openapi_client/test/test_entity.py | 4 +- .../tests/openapi_client/test/test_service.py | 6 +- 20 files changed, 567 insertions(+), 331 deletions(-) diff --git a/pkgs/clan-cli/tests/openapi_client/api/entities_api.py b/pkgs/clan-cli/tests/openapi_client/api/entities_api.py index debd9c3..82431a5 100644 --- a/pkgs/clan-cli/tests/openapi_client/api/entities_api.py +++ b/pkgs/clan-cli/tests/openapi_client/api/entities_api.py @@ -486,7 +486,7 @@ class EntitiesApi: _request_auth=_params.get('_request_auth')) @validate_arguments - def detach_entity(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> Entity: # noqa: E501 + def detach_entity(self, entity_did : Optional[StrictStr] = None, skip : Optional[StrictInt] = None, limit : Optional[StrictInt] = None, **kwargs) -> Dict[str, str]: # noqa: E501 """Detach Entity # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -510,7 +510,7 @@ class EntitiesApi: :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: Entity + :rtype: Dict[str, str] """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: @@ -556,7 +556,7 @@ class EntitiesApi: :return: Returns the result object. If the method is called asynchronously, returns the request thread. - :rtype: tuple(Entity, status_code(int), headers(HTTPHeaderDict)) + :rtype: tuple(Dict[str, str], status_code(int), headers(HTTPHeaderDict)) """ _params = locals() @@ -619,7 +619,7 @@ class EntitiesApi: _auth_settings = [] # noqa: E501 _response_types_map = { - '200': "Entity", + '200': "Dict[str, str]", '422': "HTTPValidationError", } @@ -1211,3 +1211,142 @@ class EntitiesApi: _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + + @validate_arguments + def is_attached(self, entity_did : Optional[StrictStr] = None, **kwargs) -> Dict[str, str]: # noqa: E501 + """Is Attached # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.is_attached(entity_did, async_req=True) + >>> result = thread.get() + + :param entity_did: + :type entity_did: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: Dict[str, str] + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the is_attached_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.is_attached_with_http_info(entity_did, **kwargs) # noqa: E501 + + @validate_arguments + def is_attached_with_http_info(self, entity_did : Optional[StrictStr] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Is Attached # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.is_attached_with_http_info(entity_did, async_req=True) + >>> result = thread.get() + + :param entity_did: + :type entity_did: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Dict[str, str], status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'entity_did' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method is_attached" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('entity_did') is not None: # noqa: E501 + _query_params.append(('entity_did', _params['entity_did'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "Dict[str, str]", + '422': "HTTPValidationError", + } + + return self.api_client.call_api( + '/api/v1/is_attached', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) 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 ccb0216..4a99b6c 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EntitiesApi.md @@ -1,20 +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 | # **attach_entity** - > Dict[str, str] attach_entity(entity_did=entity_did, skip=skip, limit=limit) Attach Entity @@ -52,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 @@ -70,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 @@ -110,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 @@ -121,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 @@ -137,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 @@ -186,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 @@ -202,21 +205,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 | - | -| **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** - -> Entity detach_entity(entity_did=entity_did, skip=skip, limit=limit) +> Dict[str, str] detach_entity(entity_did=entity_did, skip=skip, limit=limit) Detach Entity @@ -226,7 +227,6 @@ Detach Entity import time import os import openapi_client -from openapi_client.models.entity import Entity from openapi_client.rest import ApiException from pprint import pprint @@ -254,17 +254,19 @@ 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 -[**Entity**](Entity.md) +**Dict[str, str]** ### Authorization @@ -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,14 +542,79 @@ 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 + +### Example + +```python +import time +import os +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.EntitiesApi(api_client) + entity_did = 'did:sov:test:1234' # str | (optional) (default to 'did:sov:test:1234') + + try: + # Is Attached + api_response = api_instance.is_attached(entity_did=entity_did) + print("The response of EntitiesApi->is_attached:\n") + pprint(api_response) + except Exception as e: + 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'] + +### Return type + +**Dict[str, str]** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md index fc0e2d7..ed3b3be 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md @@ -1,15 +1,16 @@ # Entity -## Properties -| Name | Type | Description | Notes | -| ------------ | ---------- | ----------- | ----- | -| **did** | **str** | | -| **name** | **str** | | -| **ip** | **str** | | -| **visible** | **bool** | | -| **other** | **object** | | -| **attached** | **bool** | | +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**did** | **str** | | +**name** | **str** | | +**ip** | **str** | | +**visible** | **bool** | | +**other** | **object** | | +**attached** | **bool** | | +**stop_health_task** | **bool** | | ## Example @@ -28,5 +29,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..7cd1831 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md @@ -1,14 +1,14 @@ # 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** | | +**visible** | **bool** | | +**other** | **object** | | ## Example @@ -27,5 +27,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/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/entity.py b/pkgs/clan-cli/tests/openapi_client/models/entity.py index e478804..0ff4d16 100644 --- a/pkgs/clan-cli/tests/openapi_client/models/entity.py +++ b/pkgs/clan-cli/tests/openapi_client/models/entity.py @@ -31,7 +31,8 @@ class Entity(BaseModel): visible: StrictBool = Field(...) other: Dict[str, Any] = Field(...) attached: StrictBool = Field(...) - __properties = ["did", "name", "ip", "visible", "other", "attached"] + stop_health_task: StrictBool = Field(...) + __properties = ["did", "name", "ip", "visible", "other", "attached", "stop_health_task"] class Config: """Pydantic configuration""" @@ -74,7 +75,8 @@ class Entity(BaseModel): "ip": obj.get("ip"), "visible": obj.get("visible"), "other": obj.get("other"), - "attached": obj.get("attached") + "attached": obj.get("attached"), + "stop_health_task": obj.get("stop_health_task") }) return _obj diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py index ecbc5b8..91626e2 100644 --- a/pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py +++ b/pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py @@ -82,6 +82,13 @@ class TestEntitiesApi(unittest.TestCase): """ pass + def test_is_attached(self) -> None: + """Test case for is_attached + + Is Attached # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_entity.py b/pkgs/clan-cli/tests/openapi_client/test/test_entity.py index 5733915..747c942 100644 --- a/pkgs/clan-cli/tests/openapi_client/test/test_entity.py +++ b/pkgs/clan-cli/tests/openapi_client/test/test_entity.py @@ -41,7 +41,8 @@ class TestEntity(unittest.TestCase): ip = '127.0.0.1', visible = True, other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True + attached = True, + stop_health_task = True ) else: return Entity( @@ -51,6 +52,7 @@ class TestEntity(unittest.TestCase): visible = True, other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, attached = True, + stop_health_task = True, ) """ diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_service.py b/pkgs/clan-cli/tests/openapi_client/test/test_service.py index a681b0d..bc07518 100644 --- a/pkgs/clan-cli/tests/openapi_client/test/test_service.py +++ b/pkgs/clan-cli/tests/openapi_client/test/test_service.py @@ -49,7 +49,8 @@ class TestService(unittest.TestCase): ip = '127.0.0.1', visible = True, other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, ) + attached = True, + stop_health_task = True, ) ) else: return Service( @@ -66,7 +67,8 @@ class TestService(unittest.TestCase): ip = '127.0.0.1', visible = True, other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, ), + attached = True, + stop_health_task = True, ), ) """ -- 2.51.0 From e22e954a4a2bb53231a0bc9a7ae3ee616f2af55b Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 20:22:56 +0100 Subject: [PATCH 6/8] fixed build error in ui --- pkgs/clan-cli/tests/api.py | 6 +++--- pkgs/ui/src/app/client/[client_name]/page.tsx | 12 ------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/pkgs/clan-cli/tests/api.py b/pkgs/clan-cli/tests/api.py index 1c3644d..4c140c3 100644 --- a/pkgs/clan-cli/tests/api.py +++ b/pkgs/clan-cli/tests/api.py @@ -14,7 +14,7 @@ from ports import PortFunction from clan_cli.webui.app import app -@pytest.fixture(scope="session") +@pytest.fixture() def test_client() -> TestClient: return TestClient(app) @@ -31,7 +31,7 @@ def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | # Pytest fixture to run the server in a separate process -@pytest.fixture(scope="session") +@pytest.fixture() def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: port = unused_tcp_port() host = "127.0.0.1" @@ -52,7 +52,7 @@ def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: proc.terminate() -@pytest.fixture(scope="session") +@pytest.fixture() def api_client(server_url: str) -> Generator[ApiClient, None, None]: configuration = Configuration(host=server_url) diff --git a/pkgs/ui/src/app/client/[client_name]/page.tsx b/pkgs/ui/src/app/client/[client_name]/page.tsx index 4b4e68a..e47d6b4 100644 --- a/pkgs/ui/src/app/client/[client_name]/page.tsx +++ b/pkgs/ui/src/app/client/[client_name]/page.tsx @@ -25,8 +25,6 @@ import { Entity, Service } from "@/api/model"; import useGetEntityByNameOrDid from "@/components/hooks/useGetEntityByNameOrDid"; import { useGetAllServices } from "@/api/services/services"; import axios from "axios"; -import { NoDataOverlay } from "@/components/noDataOverlay"; -import { DashboardCard } from "@/components/card"; import CloseIcon from "@mui/icons-material/Close"; interface SnackMessage { @@ -34,16 +32,6 @@ interface SnackMessage { severity: "success" | "error"; } -export const RecentActivity = (entity: Entity) => { - return ( - -
- -
-
- ); -}; - type AttachButtonProps = { entity?: Entity; setSnackbarMessage: (message: SnackMessage) => void; -- 2.51.0 From acb84b8f0b56af974c57d271457a9c35875c2911 Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 20:37:17 +0100 Subject: [PATCH 7/8] Moved from xdist to normal pytest. Removed test folder from openapi_client --- pkgs/clan-cli/bin/gen-python-client | 2 + pkgs/clan-cli/default.nix | 2 - pkgs/clan-cli/pyproject.toml | 2 +- pkgs/clan-cli/tests/api.py | 6 +- .../tests/openapi_client/test/__init__.py | 0 .../openapi_client/test/test_default_api.py | 52 ---------- .../openapi_client/test/test_entities_api.py | 94 ------------------- .../tests/openapi_client/test/test_entity.py | 65 ------------- .../openapi_client/test/test_entity_create.py | 61 ------------ .../test/test_http_validation_error.py | 59 ------------ .../tests/openapi_client/test/test_machine.py | 55 ----------- .../test/test_repositories_api.py | 38 -------- .../openapi_client/test/test_resolution.py | 63 ------------- .../test/test_resolution_api.py | 38 -------- .../tests/openapi_client/test/test_service.py | 81 ---------------- .../test/test_service_create.py | 65 ------------- .../openapi_client/test/test_services_api.py | 66 ------------- .../tests/openapi_client/test/test_status.py | 34 ------- .../test/test_validation_error.py | 61 ------------ .../test/test_validation_error_loc_inner.py | 51 ---------- 20 files changed, 6 insertions(+), 889 deletions(-) delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/__init__.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_default_api.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_entity.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_entity_create.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_http_validation_error.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_machine.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_repositories_api.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_resolution.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_resolution_api.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_service.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_service_create.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_services_api.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_status.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_validation_error.py delete mode 100644 pkgs/clan-cli/tests/openapi_client/test/test_validation_error_loc_inner.py diff --git a/pkgs/clan-cli/bin/gen-python-client b/pkgs/clan-cli/bin/gen-python-client index 3c83d1b..58adc16 100755 --- a/pkgs/clan-cli/bin/gen-python-client +++ b/pkgs/clan-cli/bin/gen-python-client @@ -80,6 +80,8 @@ def main() -> None: replacement = "from typing import Any, List, Optional, Dict" replace_in_directory(directory_path=src_client, pattern=pattern, replacement=replacement) + src_clients_tests = src_client / "test" + shutil.rmtree(src_clients_tests) dst_client: Path = args.out / "openapi_client" shutil.rmtree(dst_client, ignore_errors=True) shutil.copytree(src_client, dst_client) diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index 6d3cd26..d52472f 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -8,7 +8,6 @@ , openssh , pytest , pytest-cov -, pytest-xdist , pytest-subprocess , pytest-timeout , remote-pdb @@ -56,7 +55,6 @@ let pytest pytest-cov pytest-subprocess - pytest-xdist pytest-timeout remote-pdb ipdb diff --git a/pkgs/clan-cli/pyproject.toml b/pkgs/clan-cli/pyproject.toml index 7fa8caf..adbf1ca 100644 --- a/pkgs/clan-cli/pyproject.toml +++ b/pkgs/clan-cli/pyproject.toml @@ -21,7 +21,7 @@ testpaths = "tests" faulthandler_timeout = 60 log_level = "DEBUG" log_format = "%(levelname)s: %(message)s" -addopts = "--cov . --cov-report term --cov-report html:.reports/html --no-cov-on-fail --durations 5 --color=yes --maxfail=1 --new-first -nauto" # Add --pdb for debugging +addopts = "--cov . --cov-report term --cov-report html:.reports/html --no-cov-on-fail --durations 5 --color=yes --maxfail=1 --new-first" # Add --pdb for debugging norecursedirs = "tests/helpers" markers = [ "impure" ] diff --git a/pkgs/clan-cli/tests/api.py b/pkgs/clan-cli/tests/api.py index 4c140c3..1c3644d 100644 --- a/pkgs/clan-cli/tests/api.py +++ b/pkgs/clan-cli/tests/api.py @@ -14,7 +14,7 @@ from ports import PortFunction from clan_cli.webui.app import app -@pytest.fixture() +@pytest.fixture(scope="session") def test_client() -> TestClient: return TestClient(app) @@ -31,7 +31,7 @@ def get_health(*, url: str, max_retries: int = 20, delay: float = 0.2) -> str | # Pytest fixture to run the server in a separate process -@pytest.fixture() +@pytest.fixture(scope="session") def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: port = unused_tcp_port() host = "127.0.0.1" @@ -52,7 +52,7 @@ def server_url(unused_tcp_port: PortFunction) -> Generator[str, None, None]: proc.terminate() -@pytest.fixture() +@pytest.fixture(scope="session") def api_client(server_url: str) -> Generator[ApiClient, None, None]: configuration = Configuration(host=server_url) diff --git a/pkgs/clan-cli/tests/openapi_client/test/__init__.py b/pkgs/clan-cli/tests/openapi_client/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_default_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_default_api.py deleted file mode 100644 index c8d82a9..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_default_api.py +++ /dev/null @@ -1,52 +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.default_api import DefaultApi # noqa: E501 - - -class TestDefaultApi(unittest.TestCase): - """DefaultApi unit test stubs""" - - def setUp(self) -> None: - self.api = DefaultApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_get(self) -> None: - """Test case for get - - Get # noqa: E501 - """ - pass - - def test_health(self) -> None: - """Test case for health - - Health # noqa: E501 - """ - pass - - def test_root(self) -> None: - """Test case for root - - Root # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py deleted file mode 100644 index 91626e2..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_entities_api.py +++ /dev/null @@ -1,94 +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.entities_api import EntitiesApi # noqa: E501 - - -class TestEntitiesApi(unittest.TestCase): - """EntitiesApi unit test stubs""" - - def setUp(self) -> None: - self.api = EntitiesApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_attach_entity(self) -> None: - """Test case for attach_entity - - Attach Entity # noqa: E501 - """ - pass - - def test_create_entity(self) -> None: - """Test case for create_entity - - Create Entity # noqa: E501 - """ - pass - - def test_delete_entity(self) -> None: - """Test case for delete_entity - - Delete Entity # noqa: E501 - """ - pass - - def test_detach_entity(self) -> None: - """Test case for detach_entity - - Detach Entity # noqa: E501 - """ - pass - - def test_get_all_entities(self) -> None: - """Test case for get_all_entities - - Get All Entities # noqa: E501 - """ - pass - - def test_get_attached_entities(self) -> None: - """Test case for get_attached_entities - - Get Attached Entities # noqa: E501 - """ - pass - - def test_get_entity_by_did(self) -> None: - """Test case for get_entity_by_did - - Get Entity By Did # noqa: E501 - """ - pass - - def test_get_entity_by_name(self) -> None: - """Test case for get_entity_by_name - - Get Entity By Name # noqa: E501 - """ - pass - - def test_is_attached(self) -> None: - """Test case for is_attached - - Is Attached # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_entity.py b/pkgs/clan-cli/tests/openapi_client/test/test_entity.py deleted file mode 100644 index 747c942..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_entity.py +++ /dev/null @@ -1,65 +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.entity import Entity # noqa: E501 - -class TestEntity(unittest.TestCase): - """Entity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Entity: - """Test Entity - 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 `Entity` - """ - model = Entity() # noqa: E501 - if include_optional: - return Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, - stop_health_task = True - ) - else: - return Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, - stop_health_task = True, - ) - """ - - def testEntity(self): - """Test Entity""" - # 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_entity_create.py b/pkgs/clan-cli/tests/openapi_client/test/test_entity_create.py deleted file mode 100644 index e6c4565..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_entity_create.py +++ /dev/null @@ -1,61 +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.entity_create import EntityCreate # noqa: E501 - -class TestEntityCreate(unittest.TestCase): - """EntityCreate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EntityCreate: - """Test EntityCreate - 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 `EntityCreate` - """ - model = EntityCreate() # noqa: E501 - if include_optional: - return EntityCreate( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]} - ) - else: - return EntityCreate( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - ) - """ - - def testEntityCreate(self): - """Test EntityCreate""" - # 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_http_validation_error.py b/pkgs/clan-cli/tests/openapi_client/test/test_http_validation_error.py deleted file mode 100644 index 9c2d93d..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_http_validation_error.py +++ /dev/null @@ -1,59 +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.http_validation_error import HTTPValidationError # noqa: E501 - -class TestHTTPValidationError(unittest.TestCase): - """HTTPValidationError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HTTPValidationError: - """Test HTTPValidationError - 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 `HTTPValidationError` - """ - model = HTTPValidationError() # noqa: E501 - if include_optional: - return HTTPValidationError( - detail = [ - openapi_client.models.validation_error.ValidationError( - loc = [ - null - ], - msg = '', - type = '', ) - ] - ) - else: - return HTTPValidationError( - ) - """ - - def testHTTPValidationError(self): - """Test HTTPValidationError""" - # 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_machine.py b/pkgs/clan-cli/tests/openapi_client/test/test_machine.py deleted file mode 100644 index 1138964..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_machine.py +++ /dev/null @@ -1,55 +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.machine import Machine # noqa: E501 - -class TestMachine(unittest.TestCase): - """Machine unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Machine: - """Test Machine - 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 `Machine` - """ - model = Machine() # noqa: E501 - if include_optional: - return Machine( - name = '', - status = 'online' - ) - else: - return Machine( - name = '', - status = 'online', - ) - """ - - def testMachine(self): - """Test Machine""" - # 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_repositories_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_repositories_api.py deleted file mode 100644 index ac87716..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_repositories_api.py +++ /dev/null @@ -1,38 +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.repositories_api import RepositoriesApi # noqa: E501 - - -class TestRepositoriesApi(unittest.TestCase): - """RepositoriesApi unit test stubs""" - - def setUp(self) -> None: - self.api = RepositoriesApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_get_all_repositories(self) -> None: - """Test case for get_all_repositories - - Get All Repositories # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_resolution.py b/pkgs/clan-cli/tests/openapi_client/test/test_resolution.py deleted file mode 100644 index 08ecde0..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_resolution.py +++ /dev/null @@ -1,63 +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.resolution import Resolution # noqa: E501 - -class TestResolution(unittest.TestCase): - """Resolution unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Resolution: - """Test Resolution - 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 `Resolution` - """ - model = Resolution() # noqa: E501 - if include_optional: - return Resolution( - requester_name = 'C1', - requester_did = 'did:sov:test:1122', - resolved_did = 'did:sov:test:1234', - other = {test=test}, - timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = 56 - ) - else: - return Resolution( - requester_name = 'C1', - requester_did = 'did:sov:test:1122', - resolved_did = 'did:sov:test:1234', - other = {test=test}, - timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = 56, - ) - """ - - def testResolution(self): - """Test Resolution""" - # 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_resolution_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_resolution_api.py deleted file mode 100644 index 7f26f22..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_resolution_api.py +++ /dev/null @@ -1,38 +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.resolution_api import ResolutionApi # noqa: E501 - - -class TestResolutionApi(unittest.TestCase): - """ResolutionApi unit test stubs""" - - def setUp(self) -> None: - self.api = ResolutionApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_get_all_resolutions(self) -> None: - """Test case for get_all_resolutions - - Get All Resolutions # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_service.py b/pkgs/clan-cli/tests/openapi_client/test/test_service.py deleted file mode 100644 index bc07518..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_service.py +++ /dev/null @@ -1,81 +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.service import Service # noqa: E501 - -class TestService(unittest.TestCase): - """Service unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Service: - """Test Service - 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 `Service` - """ - model = Service() # noqa: E501 - if include_optional: - return Service( - 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', - entity = openapi_client.models.entity.Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, - stop_health_task = True, ) - ) - else: - return Service( - 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', - entity = openapi_client.models.entity.Entity( - did = 'did:sov:test:1234', - name = 'C1', - ip = '127.0.0.1', - visible = True, - other = {network=Carlos Home Network, roles=[service repository, service prosumer]}, - attached = True, - stop_health_task = True, ), - ) - """ - - def testService(self): - """Test Service""" - # 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_service_create.py b/pkgs/clan-cli/tests/openapi_client/test/test_service_create.py deleted file mode 100644 index 588bb66..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_service_create.py +++ /dev/null @@ -1,65 +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.service_create import ServiceCreate # noqa: E501 - -class TestServiceCreate(unittest.TestCase): - """ServiceCreate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ServiceCreate: - """Test ServiceCreate - 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 `ServiceCreate` - """ - model = ServiceCreate() # noqa: E501 - if include_optional: - return ServiceCreate( - 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' - ) - else: - return ServiceCreate( - 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', - ) - """ - - def testServiceCreate(self): - """Test ServiceCreate""" - # 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_services_api.py b/pkgs/clan-cli/tests/openapi_client/test/test_services_api.py deleted file mode 100644 index 68470f9..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_services_api.py +++ /dev/null @@ -1,66 +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.services_api import ServicesApi # noqa: E501 - - -class TestServicesApi(unittest.TestCase): - """ServicesApi unit test stubs""" - - def setUp(self) -> None: - self.api = ServicesApi() # noqa: E501 - - def tearDown(self) -> None: - pass - - def test_create_service(self) -> None: - """Test case for create_service - - Create Service # noqa: E501 - """ - pass - - def test_delete_service(self) -> None: - """Test case for delete_service - - Delete Service # noqa: E501 - """ - pass - - def test_get_all_services(self) -> None: - """Test case for get_all_services - - Get All Services # noqa: E501 - """ - pass - - def test_get_service_by_did(self) -> None: - """Test case for get_service_by_did - - Get Service By Did # noqa: E501 - """ - pass - - def test_get_services_without_entity(self) -> None: - """Test case for get_services_without_entity - - Get Services Without Entity # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_status.py b/pkgs/clan-cli/tests/openapi_client/test/test_status.py deleted file mode 100644 index 8a69573..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_status.py +++ /dev/null @@ -1,34 +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.status import Status # noqa: E501 - -class TestStatus(unittest.TestCase): - """Status unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStatus(self): - """Test Status""" - # inst = Status() - -if __name__ == '__main__': - unittest.main() diff --git a/pkgs/clan-cli/tests/openapi_client/test/test_validation_error.py b/pkgs/clan-cli/tests/openapi_client/test/test_validation_error.py deleted file mode 100644 index 3636285..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_validation_error.py +++ /dev/null @@ -1,61 +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.validation_error import ValidationError # noqa: E501 - -class TestValidationError(unittest.TestCase): - """ValidationError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationError: - """Test ValidationError - 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 `ValidationError` - """ - model = ValidationError() # noqa: E501 - if include_optional: - return ValidationError( - loc = [ - null - ], - msg = '', - type = '' - ) - else: - return ValidationError( - loc = [ - null - ], - msg = '', - type = '', - ) - """ - - def testValidationError(self): - """Test ValidationError""" - # 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_validation_error_loc_inner.py b/pkgs/clan-cli/tests/openapi_client/test/test_validation_error_loc_inner.py deleted file mode 100644 index 545e84d..0000000 --- a/pkgs/clan-cli/tests/openapi_client/test/test_validation_error_loc_inner.py +++ /dev/null @@ -1,51 +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.validation_error_loc_inner import ValidationErrorLocInner # noqa: E501 - -class TestValidationErrorLocInner(unittest.TestCase): - """ValidationErrorLocInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationErrorLocInner: - """Test ValidationErrorLocInner - 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 `ValidationErrorLocInner` - """ - model = ValidationErrorLocInner() # noqa: E501 - if include_optional: - return ValidationErrorLocInner( - ) - else: - return ValidationErrorLocInner( - ) - """ - - def testValidationErrorLocInner(self): - """Test ValidationErrorLocInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() -- 2.51.0 From 2a9f31394ee5e31e71a5d0f1d9366fbaa379b701 Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Mon, 8 Jan 2024 20:52:23 +0100 Subject: [PATCH 8/8] nix fmt --- .../tests/openapi_client/docs/DefaultApi.md | 68 ++--- .../tests/openapi_client/docs/EntitiesApi.md | 240 +++++++++--------- .../tests/openapi_client/docs/Entity.md | 23 +- .../tests/openapi_client/docs/EntityCreate.md | 19 +- .../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 +- 15 files changed, 332 insertions(+), 350 deletions(-) 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 ed3b3be..fa7efb2 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/Entity.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/Entity.md @@ -1,16 +1,16 @@ # Entity - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**did** | **str** | | -**name** | **str** | | -**ip** | **str** | | -**visible** | **bool** | | -**other** | **object** | | -**attached** | **bool** | | -**stop_health_task** | **bool** | | + +| Name | Type | Description | Notes | +| -------------------- | ---------- | ----------- | ----- | +| **did** | **str** | | +| **name** | **str** | | +| **ip** | **str** | | +| **visible** | **bool** | | +| **other** | **object** | | +| **attached** | **bool** | | +| **stop_health_task** | **bool** | | ## Example @@ -29,6 +29,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 7cd1831..4fff16a 100644 --- a/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md +++ b/pkgs/clan-cli/tests/openapi_client/docs/EntityCreate.md @@ -1,14 +1,14 @@ # EntityCreate - ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**did** | **str** | | -**name** | **str** | | -**ip** | **str** | | -**visible** | **bool** | | -**other** | **object** | | + +| Name | Type | Description | Notes | +| ----------- | ---------- | ----------- | ----- | +| **did** | **str** | | +| **name** | **str** | | +| **ip** | **str** | | +| **visible** | **bool** | | +| **other** | **object** | | ## Example @@ -27,6 +27,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/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/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) - - -- 2.51.0