From f5a1d28c1a20b1018aa234aceee005912db38e0d Mon Sep 17 00:00:00 2001 From: Dennis Kliban Date: Thu, 4 Apr 2019 12:57:55 -0400 Subject: [PATCH] Problem: OpenAPI schema test is unreliable between different installs Solution: Remove the test re: #4104 https://pulp.plan.io/issues/4104 --- .../api/assets/stored_open_api.json | 3133 ----------------- .../tests/functional/api/test_api_schema.py | 67 - 2 files changed, 3200 deletions(-) delete mode 100644 pulp_file/tests/functional/api/assets/stored_open_api.json delete mode 100644 pulp_file/tests/functional/api/test_api_schema.py diff --git a/pulp_file/tests/functional/api/assets/stored_open_api.json b/pulp_file/tests/functional/api/assets/stored_open_api.json deleted file mode 100644 index b14769f4..00000000 --- a/pulp_file/tests/functional/api/assets/stored_open_api.json +++ /dev/null @@ -1,3133 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Pulp3 API", - "version": "v3" - }, - "host": "192.168.122.138", - "schemes": [ - "http" - ], - "basePath": "/", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "Basic": { - "type": "basic" - } - }, - "security": [ - { - "Basic": [] - } - ], - "paths": { - "/pulp/api/v3/artifacts/": { - "get": { - "operationId": "artifacts_list", - "description": "", - "parameters": [ - { - "name": "md5", - "in": "query", - "description": "Filter results where md5 matches value", - "required": false, - "type": "string" - }, - { - "name": "sha1", - "in": "query", - "description": "Filter results where sha1 matches value", - "required": false, - "type": "string" - }, - { - "name": "sha224", - "in": "query", - "description": "Filter results where sha224 matches value", - "required": false, - "type": "string" - }, - { - "name": "sha256", - "in": "query", - "description": "Filter results where sha256 matches value", - "required": false, - "type": "string" - }, - { - "name": "sha384", - "in": "query", - "description": "Filter results where sha384 matches value", - "required": false, - "type": "string" - }, - { - "name": "sha512", - "in": "query", - "description": "Filter results where sha512 matches value", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Artifact" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "artifacts_create", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Artifact" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/Artifact" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{artifact_href}": { - "get": { - "operationId": "artifacts_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Artifact" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "artifacts_delete", - "description": "Remove Artifact only if it is not associated with any Content.", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "artifact_href", - "in": "path", - "description": "URI of Artifact. e.g.: /pulp/api/v3/artifacts/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/content/file/files/": { - "get": { - "operationId": "content_file_files_list", - "description": "ViewSet for FileContent.", - "parameters": [ - { - "name": "relative_path", - "in": "query", - "description": "Filter results where relative_path matches value", - "required": false, - "type": "string" - }, - { - "name": "digest", - "in": "query", - "description": "Filter results where digest matches value", - "required": false, - "type": "string" - }, - { - "name": "repository_version", - "in": "query", - "description": "Repository Version referenced by HREF", - "required": false, - "type": "string" - }, - { - "name": "repository_version_added", - "in": "query", - "description": "Repository Version referenced by HREF", - "required": false, - "type": "string" - }, - { - "name": "repository_version_removed", - "in": "query", - "description": "Repository Version referenced by HREF", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FileContent" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "content_file_files_create", - "description": "ViewSet for FileContent.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/FileContent" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/FileContent" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{file_content_href}": { - "get": { - "operationId": "content_file_files_read", - "description": "ViewSet for FileContent.", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/FileContent" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "file_content_href", - "in": "path", - "description": "URI of File Content. e.g.: /pulp/api/v3/content/file/files/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/distributions/": { - "get": { - "operationId": "distributions_list", - "description": "Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks\nwith reservation that lock all Distributions preventing race conditions during base_path\nchecking.", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "name__in", - "in": "query", - "description": "Filter results where name is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "base_path", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "base_path__contains", - "in": "query", - "description": "Filter results where base_path contains value", - "required": false, - "type": "string" - }, - { - "name": "base_path__icontains", - "in": "query", - "description": "Filter results where base_path contains value", - "required": false, - "type": "string" - }, - { - "name": "base_path__in", - "in": "query", - "description": "Filter results where base_path is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Distribution" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "distributions_create", - "description": "Trigger an asynchronous create task", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Distribution" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{distribution_href}": { - "get": { - "operationId": "distributions_read", - "description": "Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks\nwith reservation that lock all Distributions preventing race conditions during base_path\nchecking.", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Distribution" - } - } - }, - "tags": [ - "pulp" - ] - }, - "put": { - "operationId": "distributions_update", - "description": "Trigger an asynchronous update task", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Distribution" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "patch": { - "operationId": "distributions_partial_update", - "description": "Trigger an asynchronous partial update task", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Distribution" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "distributions_delete", - "description": "Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks\nwith reservation that lock all Distributions preventing race conditions during base_path\nchecking.", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "distribution_href", - "in": "path", - "description": "URI of Distribution. e.g.: /pulp/api/v3/distributions/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/orphans/": { - "delete": { - "operationId": "orphans_delete", - "description": "Cleans up all the Content and Artifact orphans in the system", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "/pulp/api/v3/publications/": { - "get": { - "operationId": "publications_list", - "description": "", - "parameters": [ - { - "name": "ordering", - "in": "query", - "description": "Which field to use when ordering the results.", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Publication" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{publication_href}": { - "get": { - "operationId": "publications_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Publication" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "publications_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "publication_href", - "in": "path", - "description": "URI of Publication. e.g.: /pulp/api/v3/publications/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/publishers/file/file/": { - "get": { - "operationId": "publishers_file_file_list", - "description": "ViewSet for File Publishers.", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "name__in", - "in": "query", - "description": "Filter results where name is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__lt", - "in": "query", - "description": "Filter results where _last_updated is less than value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__lte", - "in": "query", - "description": "Filter results where _last_updated is less than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__gt", - "in": "query", - "description": "Filter results where _last_updated is greater than value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__gte", - "in": "query", - "description": "Filter results where _last_updated is greater than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__range", - "in": "query", - "description": "Filter results where _last_updated is between two comma separated values", - "required": false, - "type": "string" - }, - { - "name": "_last_updated", - "in": "query", - "description": "ISO 8601 formatted dates are supported", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FilePublisher" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "publishers_file_file_create", - "description": "ViewSet for File Publishers.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/FilePublisher" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/FilePublisher" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{file_publisher_href}": { - "get": { - "operationId": "publishers_file_file_read", - "description": "ViewSet for File Publishers.", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/FilePublisher" - } - } - }, - "tags": [ - "pulp" - ] - }, - "put": { - "operationId": "publishers_file_file_update", - "description": "Trigger an asynchronous update task", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/FilePublisher" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "patch": { - "operationId": "publishers_file_file_partial_update", - "description": "Trigger an asynchronous partial update task", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/FilePublisher" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "publishers_file_file_delete", - "description": "Trigger an asynchronous delete task", - "parameters": [], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "file_publisher_href", - "in": "path", - "description": "URI of File Publisher. e.g.: /pulp/api/v3/publishers/file/file/1/", - "required": true, - "type": "string" - } - ] - }, - "{file_publisher_href}publish/": { - "post": { - "operationId": "publishers_file_file_publish", - "description": "Trigger an asynchronous task to publish file content.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RepositoryPublishURL" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "file_publisher_href", - "in": "path", - "description": "URI of File Publisher. e.g.: /pulp/api/v3/publishers/file/file/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/remotes/file/file/": { - "get": { - "operationId": "remotes_file_file_list", - "description": "ViewSet for File Remotes.", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "name__in", - "in": "query", - "description": "Filter results where name is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__lt", - "in": "query", - "description": "Filter results where _last_updated is less than value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__lte", - "in": "query", - "description": "Filter results where _last_updated is less than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__gt", - "in": "query", - "description": "Filter results where _last_updated is greater than value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__gte", - "in": "query", - "description": "Filter results where _last_updated is greater than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "_last_updated__range", - "in": "query", - "description": "Filter results where _last_updated is between two comma separated values", - "required": false, - "type": "string" - }, - { - "name": "_last_updated", - "in": "query", - "description": "ISO 8601 formatted dates are supported", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/FileRemote" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "remotes_file_file_create", - "description": "ViewSet for File Remotes.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/FileRemote" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/FileRemote" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{file_remote_href}": { - "get": { - "operationId": "remotes_file_file_read", - "description": "ViewSet for File Remotes.", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/FileRemote" - } - } - }, - "tags": [ - "pulp" - ] - }, - "put": { - "operationId": "remotes_file_file_update", - "description": "Trigger an asynchronous update task", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/FileRemote" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "patch": { - "operationId": "remotes_file_file_partial_update", - "description": "Trigger an asynchronous partial update task", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/FileRemote" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "remotes_file_file_delete", - "description": "Trigger an asynchronous delete task", - "parameters": [], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "file_remote_href", - "in": "path", - "description": "URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/", - "required": true, - "type": "string" - } - ] - }, - "{file_remote_href}sync/": { - "post": { - "operationId": "remotes_file_file_sync", - "description": "Trigger an asynchronous task to sync file content.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RepositorySyncURL" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "file_remote_href", - "in": "path", - "description": "URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/repositories/": { - "get": { - "operationId": "repositories_list", - "description": "", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "name__in", - "in": "query", - "description": "Filter results where name is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Repository" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "repositories_create", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Repository" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/Repository" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{repository_href}": { - "get": { - "operationId": "repositories_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Repository" - } - } - }, - "tags": [ - "pulp" - ] - }, - "put": { - "operationId": "repositories_update", - "description": "Trigger an asynchronous task to updatea repository.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Repository" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "patch": { - "operationId": "repositories_partial_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Repository" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Repository" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "repositories_delete", - "description": "Trigger an asynchronous task to delete a repository.", - "parameters": [], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "repository_href", - "in": "path", - "description": "URI of Repository. e.g.: /pulp/api/v3/repositories/1/", - "required": true, - "type": "string" - } - ] - }, - "{repository_href}versions/": { - "get": { - "operationId": "repositories_versions_list", - "description": "", - "parameters": [ - { - "name": "ordering", - "in": "query", - "description": "Which field to use when ordering the results.", - "required": false, - "type": "string" - }, - { - "name": "number", - "in": "query", - "description": "", - "required": false, - "type": "number" - }, - { - "name": "number__lt", - "in": "query", - "description": "Filter results where number is less than value", - "required": false, - "type": "number" - }, - { - "name": "number__lte", - "in": "query", - "description": "Filter results where number is less than or equal to value", - "required": false, - "type": "number" - }, - { - "name": "number__gt", - "in": "query", - "description": "Filter results where number is greater than value", - "required": false, - "type": "number" - }, - { - "name": "number__gte", - "in": "query", - "description": "Filter results where number is greater than or equal to value", - "required": false, - "type": "number" - }, - { - "name": "number__range", - "in": "query", - "description": "Filter results where number is between two comma separated values", - "required": false, - "type": "number" - }, - { - "name": "_created__lt", - "in": "query", - "description": "Filter results where _created is less than value", - "required": false, - "type": "string" - }, - { - "name": "_created__lte", - "in": "query", - "description": "Filter results where _created is less than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "_created__gt", - "in": "query", - "description": "Filter results where _created is greater than value", - "required": false, - "type": "string" - }, - { - "name": "_created__gte", - "in": "query", - "description": "Filter results where _created is greater than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "_created__range", - "in": "query", - "description": "Filter results where _created is between two comma separated values", - "required": false, - "type": "string" - }, - { - "name": "content", - "in": "query", - "description": "Content Unit referenced by HREF", - "required": false, - "type": "string" - }, - { - "name": "_created", - "in": "query", - "description": "ISO 8601 formatted dates are supported", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/RepositoryVersion" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "repositories_versions_create", - "description": "Trigger an asynchronous task to create a new repository version.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RepositoryVersionCreate" - } - } - ], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "repository_href", - "in": "path", - "description": "URI of Repository. e.g.: /pulp/api/v3/repositories/1/", - "required": true, - "type": "string" - } - ] - }, - "{repository_version_href}": { - "get": { - "operationId": "repositories_versions_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/RepositoryVersion" - } - } - }, - "tags": [ - "pulp" - ] - }, - "put": { - "operationId": "repositories_versions_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RepositoryVersion" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/RepositoryVersion" - } - } - }, - "tags": [ - "pulp" - ] - }, - "patch": { - "operationId": "repositories_versions_partial_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RepositoryVersion" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/RepositoryVersion" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "repositories_versions_delete", - "description": "Trigger an asynchronous task to delete a repositroy version.", - "parameters": [], - "responses": { - "202": { - "description": "", - "schema": { - "$ref": "#/definitions/AsyncOperationResponse" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "repository_version_href", - "in": "path", - "description": "URI of Repository Version. e.g.: /pulp/api/v3/repositories/1/versions/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/status/": { - "get": { - "operationId": "status_list", - "description": "Returns app information including the version of pulpcore and loaded pulp plugins,\nknown workers, database connection status, and messaging connection status", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "/pulp/api/v3/tasks/": { - "get": { - "operationId": "tasks_list", - "description": "", - "parameters": [ - { - "name": "ordering", - "in": "query", - "description": "Which field to use when ordering the results.", - "required": false, - "type": "string" - }, - { - "name": "state", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "state__in", - "in": "query", - "description": "Filter results where state is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "worker", - "in": "query", - "description": "Foreign Key referenced by HREF", - "required": false, - "type": "string" - }, - { - "name": "worker__in", - "in": "query", - "description": "Filter results where worker is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "name__contains", - "in": "query", - "description": "Filter results where name contains value", - "required": false, - "type": "string" - }, - { - "name": "started_at__lt", - "in": "query", - "description": "Filter results where started_at is less than value", - "required": false, - "type": "string" - }, - { - "name": "started_at__lte", - "in": "query", - "description": "Filter results where started_at is less than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "started_at__gt", - "in": "query", - "description": "Filter results where started_at is greater than value", - "required": false, - "type": "string" - }, - { - "name": "started_at__gte", - "in": "query", - "description": "Filter results where started_at is greater than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "started_at__range", - "in": "query", - "description": "Filter results where started_at is between two comma separated values", - "required": false, - "type": "string" - }, - { - "name": "finished_at__lt", - "in": "query", - "description": "Filter results where finished_at is less than value", - "required": false, - "type": "string" - }, - { - "name": "finished_at__lte", - "in": "query", - "description": "Filter results where finished_at is less than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "finished_at__gt", - "in": "query", - "description": "Filter results where finished_at is greater than value", - "required": false, - "type": "string" - }, - { - "name": "finished_at__gte", - "in": "query", - "description": "Filter results where finished_at is greater than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "finished_at__range", - "in": "query", - "description": "Filter results where finished_at is between two comma separated values", - "required": false, - "type": "string" - }, - { - "name": "parent", - "in": "query", - "description": "Foreign Key referenced by HREF", - "required": false, - "type": "string" - }, - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "started_at", - "in": "query", - "description": "ISO 8601 formatted dates are supported", - "required": false, - "type": "string" - }, - { - "name": "finished_at", - "in": "query", - "description": "ISO 8601 formatted dates are supported", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Task" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{task_href}": { - "get": { - "operationId": "tasks_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Task" - } - } - }, - "tags": [ - "pulp" - ] - }, - "delete": { - "operationId": "tasks_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "task_href", - "in": "path", - "description": "URI of Task. e.g.: /pulp/api/v3/tasks/1/", - "required": true, - "type": "string" - } - ] - }, - "{task_href}cancel/": { - "post": { - "operationId": "tasks_cancel", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Task" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/Task" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "task_href", - "in": "path", - "description": "URI of Task. e.g.: /pulp/api/v3/tasks/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/uploads/": { - "get": { - "operationId": "uploads_read", - "description": "Handle GET requests.", - "parameters": [ - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Upload" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "uploads_create", - "description": "Handle POST requests.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Upload" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/Upload" - } - } - }, - "tags": [ - "pulp" - ] - }, - "put": { - "operationId": "uploads_update", - "description": "Handle PUT requests.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Upload" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Upload" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{upload_href}": { - "get": { - "operationId": "uploads_read", - "description": "Handle GET requests.", - "parameters": [ - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Upload" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "post": { - "operationId": "uploads_create", - "description": "Handle POST requests.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Upload" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/Upload" - } - } - }, - "tags": [ - "pulp" - ] - }, - "put": { - "operationId": "uploads_update", - "description": "Handle PUT requests.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Upload" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Upload" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "upload_href", - "in": "path", - "description": "URI of Upload. e.g.: /pulp/api/v3/uploads/1/", - "required": true, - "type": "string" - } - ] - }, - "/pulp/api/v3/workers/": { - "get": { - "operationId": "workers_list", - "description": "", - "parameters": [ - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "name__in", - "in": "query", - "description": "Filter results where name is in a comma-separated list of values", - "required": false, - "type": "string" - }, - { - "name": "last_heartbeat__lt", - "in": "query", - "description": "Filter results where last_heartbeat is less than value", - "required": false, - "type": "string" - }, - { - "name": "last_heartbeat__lte", - "in": "query", - "description": "Filter results where last_heartbeat is less than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "last_heartbeat__gt", - "in": "query", - "description": "Filter results where last_heartbeat is greater than value", - "required": false, - "type": "string" - }, - { - "name": "last_heartbeat__gte", - "in": "query", - "description": "Filter results where last_heartbeat is greater than or equal to value", - "required": false, - "type": "string" - }, - { - "name": "last_heartbeat__range", - "in": "query", - "description": "Filter results where last_heartbeat is between two comma separated values", - "required": false, - "type": "string" - }, - { - "name": "online", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "missing", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_heartbeat", - "in": "query", - "description": "ISO 8601 formatted dates are supported", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "page_size", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Worker" - } - } - } - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [] - }, - "{worker_href}": { - "get": { - "operationId": "workers_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Worker" - } - } - }, - "tags": [ - "pulp" - ] - }, - "parameters": [ - { - "name": "worker_href", - "in": "path", - "description": "URI of Worker. e.g.: /pulp/api/v3/workers/1/", - "required": true, - "type": "string" - } - ] - } - }, - "definitions": { - "Artifact": { - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "file": { - "title": "File", - "description": "The stored file.", - "type": "string", - "readOnly": true - }, - "size": { - "title": "Size", - "description": "The size of the file in bytes.", - "type": "integer" - }, - "md5": { - "title": "Md5", - "description": "The MD5 checksum of the file if available.", - "type": "string" - }, - "sha1": { - "title": "Sha1", - "description": "The SHA-1 checksum of the file if available.", - "type": "string" - }, - "sha224": { - "title": "Sha224", - "description": "The SHA-224 checksum of the file if available.", - "type": "string" - }, - "sha256": { - "title": "Sha256", - "description": "The SHA-256 checksum of the file if available.", - "type": "string" - }, - "sha384": { - "title": "Sha384", - "description": "The SHA-384 checksum of the file if available.", - "type": "string" - }, - "sha512": { - "title": "Sha512", - "description": "The SHA-512 checksum of the file if available.", - "type": "string" - }, - "upload": { - "title": "Upload", - "type": "string", - "format": "uri" - } - } - }, - "FileContent": { - "required": [ - "_artifact", - "relative_path" - ], - "type": "object", - "properties": { - "_artifact": { - "title": " artifact", - "description": "Artifact file representing the physical content", - "type": "string", - "format": "uri" - }, - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "_type": { - "title": " type", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "relative_path": { - "title": "Relative path", - "description": "Relative location of the file within the repository", - "type": "string", - "minLength": 1 - } - } - }, - "Distribution": { - "required": [ - "name", - "base_path" - ], - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "name": { - "title": "Name", - "description": "A unique distribution name. Ex, `rawhide` and `stable`.", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "publisher": { - "title": "Publisher", - "description": "Publications created by this publisher and repository are automaticallyserved as defined by this distribution", - "type": "string", - "format": "uri", - "x-nullable": true - }, - "publication": { - "title": "Publication", - "description": "The publication being served as defined by this distribution", - "type": "string", - "format": "uri", - "x-nullable": true - }, - "repository": { - "title": "Repository", - "description": "Publications created by this repository and publisher are automaticallyserved as defined by this distribution", - "type": "string", - "format": "uri", - "x-nullable": true - }, - "content_guard": { - "title": "Content guard", - "description": "An optional content-guard.", - "type": "string", - "format": "uri", - "x-nullable": true - }, - "remote": { - "title": "Remote", - "description": "Remote that can be used to fetch content when using pull-through caching.", - "type": "string", - "format": "uri", - "x-nullable": true - }, - "base_path": { - "title": "Base path", - "description": "The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "base_url": { - "title": "Base url", - "description": "The URL for accessing the publication as defined by this distribution.", - "type": "string", - "readOnly": true, - "minLength": 1 - } - } - }, - "AsyncOperationResponse": { - "required": [ - "task" - ], - "type": "object", - "properties": { - "task": { - "title": "Task", - "description": "The href of the task.", - "type": "string", - "format": "uri" - } - } - }, - "Publication": { - "required": [ - "publisher" - ], - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "publisher": { - "title": "Publisher", - "description": "The publisher that created this publication.", - "type": "string", - "format": "uri" - }, - "_distributions": { - "description": "This publication is currently being served asdefined by these distributions.", - "type": "array", - "items": { - "description": "This publication is currently being served asdefined by these distributions.", - "type": "string", - "format": "uri" - }, - "readOnly": true, - "uniqueItems": true - }, - "repository_version": { - "title": "Repository version", - "type": "string", - "format": "uri", - "readOnly": true - } - } - }, - "FilePublisher": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "_type": { - "title": " type", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "name": { - "title": "Name", - "description": "A unique name for this publisher.", - "type": "string", - "minLength": 1 - }, - "_last_updated": { - "title": " last updated", - "description": "Timestamp of the most recent update of the publisher configuration.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "_distributions": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - }, - "readOnly": true, - "uniqueItems": true - }, - "manifest": { - "title": "Manifest", - "description": "Name of the file manifest, the full path will be url/manifest", - "type": "string", - "default": "PULP_MANIFEST", - "minLength": 1 - } - } - }, - "RepositoryPublishURL": { - "type": "object", - "properties": { - "repository": { - "title": "Repository", - "description": "A URI of the repository to be synchronized.", - "type": "string", - "format": "uri" - }, - "repository_version": { - "title": "Repository Version", - "description": "A URI of the repository version to be published.", - "type": "string", - "format": "uri" - } - } - }, - "FileRemote": { - "required": [ - "name", - "url" - ], - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "_type": { - "title": " type", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "name": { - "title": "Name", - "description": "A unique name for this remote.", - "type": "string", - "minLength": 1 - }, - "url": { - "title": "Url", - "description": "The URL of an external content source.", - "type": "string", - "minLength": 1 - }, - "validate": { - "title": "Validate", - "description": "If True, the plugin will validate imported artifacts.", - "type": "boolean" - }, - "ssl_ca_certificate": { - "title": "Ssl ca certificate", - "description": "A PEM encoded CA certificate used to validate the server certificate presented by the remote server.", - "type": "string", - "readOnly": true - }, - "ssl_client_certificate": { - "title": "Ssl client certificate", - "description": "A PEM encoded client certificate used for authentication.", - "type": "string", - "readOnly": true - }, - "ssl_client_key": { - "title": "Ssl client key", - "description": "A PEM encoded private key used for authentication.", - "type": "string", - "readOnly": true - }, - "ssl_validation": { - "title": "Ssl validation", - "description": "If True, SSL peer validation must be performed.", - "type": "boolean" - }, - "proxy_url": { - "title": "Proxy url", - "description": "The proxy URL. Format: scheme://user:password@host:port", - "type": "string" - }, - "username": { - "title": "Username", - "description": "The username to be used for authentication when syncing.", - "type": "string" - }, - "password": { - "title": "Password", - "description": "The password to be used for authentication when syncing.", - "type": "string" - }, - "_last_updated": { - "title": " last updated", - "description": "Timestamp of the most recent update of the remote.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "download_concurrency": { - "title": "Download concurrency", - "description": "Total number of simultaneous connections.", - "type": "integer", - "minimum": 1 - }, - "policy": { - "title": "Policy", - "description": "The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'cache_only'. 'immediate' is the default.", - "type": "string", - "enum": [ - "immediate", - "on_demand", - "streamed" - ], - "default": "immediate" - } - } - }, - "RepositorySyncURL": { - "required": [ - "repository" - ], - "type": "object", - "properties": { - "repository": { - "title": "Repository", - "description": "A URI of the repository to be synchronized.", - "type": "string", - "format": "uri" - }, - "mirror": { - "title": "Mirror", - "description": "The synchronization mode, True for \"mirror\" and False for \"additive\" mode.", - "type": "boolean", - "default": false - } - } - }, - "Repository": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "_versions_href": { - "title": " versions href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_latest_version_href": { - "title": " latest version href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "name": { - "title": "Name", - "description": "A unique name for this repository.", - "type": "string", - "minLength": 1 - }, - "description": { - "title": "Description", - "description": "An optional description.", - "type": "string" - } - } - }, - "RepositoryVersion": { - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "number": { - "title": "Number", - "type": "integer", - "readOnly": true - }, - "base_version": { - "title": "Base version", - "description": "A repository version whose content was used as the initial set of content for this repository version", - "type": "string", - "format": "uri" - }, - "content_summary": { - "title": "Content summary", - "description": "Various count summaries of the content in the version and the HREF to view them.", - "type": "string", - "readOnly": true - } - } - }, - "RepositoryVersionCreate": { - "required": [ - "add_content_units", - "remove_content_units" - ], - "type": "object", - "properties": { - "add_content_units": { - "description": "A list of content units to add to a new repository version", - "type": "array", - "items": { - "type": "string" - } - }, - "remove_content_units": { - "description": "A list of content units to remove from the latest repository version", - "type": "array", - "items": { - "type": "string" - } - }, - "base_version": { - "title": "Base version", - "description": "A repository version whose content will be used as the initial set of content for the new repository version", - "type": "string", - "format": "uri" - } - } - }, - "ProgressReport": { - "type": "object", - "properties": { - "message": { - "title": "Message", - "description": "The message shown to the user for the progress report.", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "state": { - "title": "State", - "description": "The current state of the progress report. The possible values are: 'waiting', 'skipped', 'running', 'completed', 'failed' and 'canceled'. The default is 'waiting'.", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "total": { - "title": "Total", - "description": "The total count of items to be handled by the ProgressBar.", - "type": "integer", - "readOnly": true - }, - "done": { - "title": "Done", - "description": "The count of items already processed. Defaults to 0.", - "type": "integer", - "readOnly": true - }, - "suffix": { - "title": "Suffix", - "description": "The suffix to be shown with the progress report.", - "type": "string", - "readOnly": true - }, - "task": { - "title": "Task", - "description": "The task associated with this progress report.", - "type": "string", - "format": "uri", - "readOnly": true - } - } - }, - "Task": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "state": { - "title": "State", - "description": "The current state of the task. The possible values include: 'waiting', 'skipped', 'running', 'completed', 'failed' and 'canceled'.", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "name": { - "title": "Name", - "description": "The name of task.", - "type": "string", - "minLength": 1 - }, - "started_at": { - "title": "Started at", - "description": "Timestamp of the when this task started execution.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "finished_at": { - "title": "Finished at", - "description": "Timestamp of the when this task stopped execution.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "non_fatal_errors": { - "title": "Non fatal errors", - "description": "A JSON Object of non-fatal errors encountered during the execution of this task.", - "type": "string", - "readOnly": true - }, - "error": { - "title": "Error", - "description": "A JSON Object of a fatal error encountered during the execution of this task.", - "type": "string", - "readOnly": true - }, - "worker": { - "title": "Worker", - "description": "The worker associated with this task. This field is empty if a worker is not yet assigned.", - "type": "string", - "format": "uri", - "readOnly": true - }, - "parent": { - "title": "Parent", - "description": "The parent task that spawned this task.", - "type": "string", - "format": "uri", - "readOnly": true - }, - "spawned_tasks": { - "description": "Any tasks spawned by this task.", - "type": "array", - "items": { - "description": "Any tasks spawned by this task.", - "type": "string", - "format": "uri" - }, - "readOnly": true, - "uniqueItems": true - }, - "progress_reports": { - "type": "array", - "items": { - "$ref": "#/definitions/ProgressReport" - }, - "readOnly": true - }, - "created_resources": { - "description": "Resources created by this task.", - "type": "array", - "items": { - "description": "Resources created by this task.", - "type": "string", - "format": "uri" - }, - "readOnly": true, - "uniqueItems": true - } - } - }, - "Upload": { - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "file": { - "title": "File", - "type": "string", - "readOnly": true - }, - "offset": { - "title": "Offset", - "type": "integer", - "maximum": 9223372036854775807, - "minimum": -9223372036854775808 - }, - "expires_at": { - "title": "Expires at", - "type": "string", - "readOnly": true - } - } - }, - "Worker": { - "type": "object", - "properties": { - "_href": { - "title": " href", - "type": "string", - "format": "uri", - "readOnly": true - }, - "_created": { - "title": " created", - "description": "Timestamp of creation.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "name": { - "title": "Name", - "description": "The name of the worker.", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "last_heartbeat": { - "title": "Last heartbeat", - "description": "Timestamp of the last time the worker talked to the service.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "online": { - "title": "Online", - "description": "True if the worker is considered online, otherwise False", - "type": "boolean", - "readOnly": true - }, - "missing": { - "title": "Missing", - "description": "True if the worker is considerd missing, otherwise False", - "type": "boolean", - "readOnly": true - } - } - } - } -} \ No newline at end of file diff --git a/pulp_file/tests/functional/api/test_api_schema.py b/pulp_file/tests/functional/api/test_api_schema.py deleted file mode 100644 index 39519fa2..00000000 --- a/pulp_file/tests/functional/api/test_api_schema.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding=utf-8 -"""Assert that there is no changes in autogenerated API.""" -import json -import os -import subprocess -import tempfile -import unittest - -from pulp_smash import api, config -from pulp_file.tests.functional.constants import API_SCHEMA_PATH -from pulp_file.tests.functional.utils import set_up_module as setUpModule # noqa:F401 - - -class APISchemaTestCase(unittest.TestCase): - """Verify API schema change. - - This test targets the following issue: - - * `Pulp #4123 `_ - """ - - def test_verify_api_schema(self): - """Verify API schema change.""" - client = api.Client(config.get_config(), api.json_handler) - generated_open_api = client.get(API_SCHEMA_PATH) - - current_dir = os.path.dirname(os.path.abspath(__file__)) - assets_dir = os.path.join(current_dir, 'assets') - - with tempfile.TemporaryDirectory() as temp_dir: - generated_open_api_path = os.path.join( - temp_dir, - 'generated_open_api.json' - ) - create_json(generated_open_api_path, generated_open_api) - stored_open_api_path = os.path.join( - assets_dir, - 'stored_open_api.json' - ) - stored_open_api = load_json(stored_open_api_path) - current_schema_path = os.path.join( - temp_dir, - 'current_stored_open_api.json' - ) - create_json(current_schema_path, stored_open_api) - cmd = 'diff -u -b {} {}'.format( - current_schema_path, - generated_open_api_path - ) - diff = subprocess.run(cmd.split(), stdout=subprocess.PIPE).stdout - self.assertEqual(len(diff), 0, diff) - - -def load_json(json_path): - """Load a json file from the filesystem.""" - with open(json_path, 'r') as json_file: - data = json.load(json_file) - return data - - -def create_json(json_path, json_data): - """Create a json file given a path.""" - # Remove `host` element from the json file since this element will change. - # when running the test in different hosts. - json_data.pop('host', None) - with open(json_path, 'w') as data_file: - json.dump(json_data, data_file, sort_keys=True, indent=2)