diff --git a/gns3server/schemas/__init__.py b/gns3server/schemas/__init__.py index 2aa6bb38b..74ddfe4af 100644 --- a/gns3server/schemas/__init__.py +++ b/gns3server/schemas/__init__.py @@ -213,8 +213,8 @@ __all__ = [ "ATMSwitch", "ATMSwitchCreate", "ATMSwitchUpdate", - "ApiKey", "AnchorNIO", + "ApiKey", "ApiKeyCreate", "ApiKeyCreated", "ApiKeyMessage", diff --git a/gns3server/schemas/controller/links.py b/gns3server/schemas/controller/links.py index c6b641c63..e1ac4993c 100644 --- a/gns3server/schemas/controller/links.py +++ b/gns3server/schemas/controller/links.py @@ -139,29 +139,6 @@ class LinkFilters(BaseModel): ) -class LinkFilterParameter(BaseModel): - """ - Parameter of a packet filter. - """ - - name: str - type: Literal["int", "text", "str"] - minimum: Optional[int] = None - maximum: Optional[int] = None - unit: Optional[str] = None - - -class LinkFilterDefinition(BaseModel): - """ - Packet filter available on a link. - """ - - type: LinkFilterType - name: str - description: str - parameters: List[LinkFilterParameter] - - class LinkBase(BaseModel): """ Link data. diff --git a/tests/api/routes/controller/test_appliances.py b/tests/api/routes/controller/test_appliances.py index 193557e35..e2b853f5f 100644 --- a/tests/api/routes/controller/test_appliances.py +++ b/tests/api/routes/controller/test_appliances.py @@ -105,7 +105,7 @@ class TestApplianceRoutes: async def test_add_v8_version_appliance(self, app: FastAPI, client: AsyncClient) -> None: appliance_id = "1cfdf900-7c30-4cb7-8f03-3f61d2581633" # Empty VM appliance - new_version = {"name": "v8-99G", "category": "guest", "images": {"hda_disk_image": "empty99G.qcow2"}} + new_version = {"name": "v8-99G", "images": {"hda_disk_image": "empty99G.qcow2"}} response = await client.post( app.url_path_for("add_appliance_version", appliance_id=appliance_id), json=new_version ) diff --git a/tests/api/routes/controller/test_links.py b/tests/api/routes/controller/test_links.py index 54830923b..14e5b9699 100644 --- a/tests/api/routes/controller/test_links.py +++ b/tests/api/routes/controller/test_links.py @@ -648,12 +648,12 @@ class TestLinkRoutes: assert "LinkFilters" not in schemas filters_property = schemas["Link"]["properties"]["filters"] assert filters_property["anyOf"][0] == {"additionalProperties": True, "type": "object"} - assert schemas["LinkFilterDefinition"]["properties"]["parameters"]["items"] == { + assert schemas["LinkFilterInfo"]["properties"]["parameters"]["items"] == { "$ref": "#/components/schemas/LinkFilterParameter" } path = "/v3/projects/{project_id}/links/{link_id}/available_filters" responses = app.openapi()["paths"][path]["get"]["responses"]["200"]["content"]["application/json"]["schema"] - assert responses["items"] == {"$ref": "#/components/schemas/LinkFilterDefinition"} + assert responses["items"] == {"$ref": "#/components/schemas/LinkFilterInfo"} async def test_get_udp_interface(self, app: FastAPI, client: AsyncClient, project: Project) -> None: """