Skip to content

Commit

Permalink
Use lowercase rhsm in the url
Browse files Browse the repository at this point in the history
  • Loading branch information
bmbouter committed Apr 22, 2020
1 parent a9b6ccf commit cb56475
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/6545.misc
@@ -0,0 +1 @@
Lowercase the ``RHSM`` to ``rhsm`` in its URLs.
2 changes: 1 addition & 1 deletion docs/_static/api.json
@@ -1 +1 @@
{"swagger": "2.0", "info": {"title": "Pulp 3 API", "license": {"name": "GPLv2+"}, "logo": {"url": "https://pulp.plan.io/attachments/download/517478/pulp_logo_word_rectangle.svg"}, "version": "v3"}, "host": "localhost:24817", "schemes": ["http"], "basePath": "/", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Basic": {"type": "basic"}}, "security": [{"Basic": []}], "paths": {"/pulp/api/v3/contentguards/certguard/RHSM/": {"get": {"operationId": "contentguards_certguard_RHSM_list", "summary": "List rhsm cert guards", "description": "RHSMCertGuard API Viewsets.", "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": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "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/certguard.RHSMCertGuard"}}}}}}, "tags": ["contentguards: RHSM"]}, "post": {"operationId": "contentguards_certguard_RHSM_create", "summary": "Create a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: RHSM"]}, "parameters": []}, "{r_h_s_m_cert_guard_href}": {"get": {"operationId": "contentguards_certguard_RHSM_read", "summary": "Inspect a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: RHSM"]}, "put": {"operationId": "contentguards_certguard_RHSM_update", "summary": "Update a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: RHSM"]}, "patch": {"operationId": "contentguards_certguard_RHSM_partial_update", "summary": "Partially update a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: RHSM"]}, "delete": {"operationId": "contentguards_certguard_RHSM_delete", "summary": "Delete a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["contentguards: RHSM"]}, "parameters": [{"name": "r_h_s_m_cert_guard_href", "in": "path", "description": "URI of R H S M Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/RHSM/1/", "required": true, "type": "string"}]}, "/pulp/api/v3/contentguards/certguard/x509/": {"get": {"operationId": "contentguards_certguard_x509_list", "summary": "List x509 cert guards", "description": "X509CertGuard API Viewsets.", "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": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "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/certguard.X509CertGuard"}}}}}}, "tags": ["contentguards: x509"]}, "post": {"operationId": "contentguards_certguard_x509_create", "summary": "Create a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "parameters": []}, "{x509_cert_guard_href}": {"get": {"operationId": "contentguards_certguard_x509_read", "summary": "Inspect a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "put": {"operationId": "contentguards_certguard_x509_update", "summary": "Update a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "patch": {"operationId": "contentguards_certguard_x509_partial_update", "summary": "Partially update a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "delete": {"operationId": "contentguards_certguard_x509_delete", "summary": "Delete a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["contentguards: x509"]}, "parameters": [{"name": "x509_cert_guard_href", "in": "path", "description": "URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/", "required": true, "type": "string"}]}}, "definitions": {"certguard.RHSMCertGuard": {"required": ["name", "ca_certificate"], "type": "object", "properties": {"pulp_href": {"title": "Pulp href", "type": "string", "format": "uri", "readOnly": true}, "pulp_created": {"title": "Pulp created", "description": "Timestamp of creation.", "type": "string", "format": "date-time", "readOnly": true}, "name": {"title": "Name", "description": "The unique name.", "type": "string", "minLength": 1}, "description": {"title": "Description", "description": "An optional description.", "type": "string", "minLength": 1, "x-nullable": true}, "ca_certificate": {"title": "Ca certificate", "description": "The Certificate Authority (CA) certificate.", "type": "string", "minLength": 1}}}, "certguard.X509CertGuard": {"required": ["name", "ca_certificate"], "type": "object", "properties": {"pulp_href": {"title": "Pulp href", "type": "string", "format": "uri", "readOnly": true}, "pulp_created": {"title": "Pulp created", "description": "Timestamp of creation.", "type": "string", "format": "date-time", "readOnly": true}, "name": {"title": "Name", "description": "The unique name.", "type": "string", "minLength": 1}, "description": {"title": "Description", "description": "An optional description.", "type": "string", "minLength": 1, "x-nullable": true}, "ca_certificate": {"title": "Ca certificate", "description": "The Certificate Authority (CA) certificate.", "type": "string", "minLength": 1}}}}, "tags": [{"name": "contentguards: RHSM", "x-displayName": "Contentguards: Rhsm"}, {"name": "contentguards: x509", "x-displayName": "Contentguards: X509"}]}
{"swagger": "2.0", "info": {"title": "Pulp 3 API", "license": {"name": "GPLv2+"}, "logo": {"url": "https://pulp.plan.io/attachments/download/517478/pulp_logo_word_rectangle.svg"}, "version": "v3"}, "host": "localhost:24817", "schemes": ["http"], "basePath": "/", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"Basic": {"type": "basic"}}, "security": [{"Basic": []}], "paths": {"/pulp/api/v3/contentguards/certguard/rhsm/": {"get": {"operationId": "contentguards_certguard_rhsm_list", "summary": "List rhsm cert guards", "description": "RHSMCertGuard API Viewsets.", "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": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "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/certguard.RHSMCertGuard"}}}}}}, "tags": ["contentguards: rhsm"]}, "post": {"operationId": "contentguards_certguard_rhsm_create", "summary": "Create a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: rhsm"]}, "parameters": []}, "{r_h_s_m_cert_guard_href}": {"get": {"operationId": "contentguards_certguard_rhsm_read", "summary": "Inspect a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: rhsm"]}, "put": {"operationId": "contentguards_certguard_rhsm_update", "summary": "Update a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: rhsm"]}, "patch": {"operationId": "contentguards_certguard_rhsm_partial_update", "summary": "Partially update a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.RHSMCertGuard"}}}, "tags": ["contentguards: rhsm"]}, "delete": {"operationId": "contentguards_certguard_rhsm_delete", "summary": "Delete a rhsm cert guard", "description": "RHSMCertGuard API Viewsets.", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["contentguards: rhsm"]}, "parameters": [{"name": "r_h_s_m_cert_guard_href", "in": "path", "description": "URI of R H S M Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/rhsm/1/", "required": true, "type": "string"}]}, "/pulp/api/v3/contentguards/certguard/x509/": {"get": {"operationId": "contentguards_certguard_x509_list", "summary": "List x509 cert guards", "description": "X509CertGuard API Viewsets.", "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": "limit", "in": "query", "description": "Number of results to return per page.", "required": false, "type": "integer"}, {"name": "offset", "in": "query", "description": "The initial index from which to return the results.", "required": false, "type": "integer"}, {"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "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/certguard.X509CertGuard"}}}}}}, "tags": ["contentguards: x509"]}, "post": {"operationId": "contentguards_certguard_x509_create", "summary": "Create a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}], "responses": {"201": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "parameters": []}, "{x509_cert_guard_href}": {"get": {"operationId": "contentguards_certguard_x509_read", "summary": "Inspect a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "fields", "in": "query", "description": "A list of fields to include in the response.", "required": false, "type": "string"}, {"name": "exclude_fields", "in": "query", "description": "A list of fields to exclude from the response.", "required": false, "type": "string"}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "put": {"operationId": "contentguards_certguard_x509_update", "summary": "Update a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "patch": {"operationId": "contentguards_certguard_x509_partial_update", "summary": "Partially update a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [{"name": "data", "in": "body", "required": true, "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}], "responses": {"200": {"description": "", "schema": {"$ref": "#/definitions/certguard.X509CertGuard"}}}, "tags": ["contentguards: x509"]}, "delete": {"operationId": "contentguards_certguard_x509_delete", "summary": "Delete a x509 cert guard", "description": "X509CertGuard API Viewsets.", "parameters": [], "responses": {"204": {"description": ""}}, "tags": ["contentguards: x509"]}, "parameters": [{"name": "x509_cert_guard_href", "in": "path", "description": "URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/", "required": true, "type": "string"}]}}, "definitions": {"certguard.RHSMCertGuard": {"required": ["name", "ca_certificate"], "type": "object", "properties": {"pulp_href": {"title": "Pulp href", "type": "string", "format": "uri", "readOnly": true}, "pulp_created": {"title": "Pulp created", "description": "Timestamp of creation.", "type": "string", "format": "date-time", "readOnly": true}, "name": {"title": "Name", "description": "The unique name.", "type": "string", "minLength": 1}, "description": {"title": "Description", "description": "An optional description.", "type": "string", "minLength": 1, "x-nullable": true}, "ca_certificate": {"title": "Ca certificate", "description": "The Certificate Authority (CA) certificate.", "type": "string", "minLength": 1}}}, "certguard.X509CertGuard": {"required": ["name", "ca_certificate"], "type": "object", "properties": {"pulp_href": {"title": "Pulp href", "type": "string", "format": "uri", "readOnly": true}, "pulp_created": {"title": "Pulp created", "description": "Timestamp of creation.", "type": "string", "format": "date-time", "readOnly": true}, "name": {"title": "Name", "description": "The unique name.", "type": "string", "minLength": 1}, "description": {"title": "Description", "description": "An optional description.", "type": "string", "minLength": 1, "x-nullable": true}, "ca_certificate": {"title": "Ca certificate", "description": "The Certificate Authority (CA) certificate.", "type": "string", "minLength": 1}}}}, "tags": [{"name": "contentguards: rhsm", "x-displayName": "Contentguards: Rhsm"}, {"name": "contentguards: x509", "x-displayName": "Contentguards: X509"}]}
3 changes: 1 addition & 2 deletions pulp_certguard/app/models.py
Expand Up @@ -85,7 +85,7 @@ class RHSMCertGuard(BaseCertGuard):
of a path declared in the trusted RHSM Client Certificate.
Fields:
rhsm_certificate (models.TextField): The RHSM Ccertificate used to validate the client
rhsm_certificate (models.TextField): The RHSM Certificate used to validate the client
certificate at request time.
"""

Expand Down Expand Up @@ -119,7 +119,6 @@ def permit(self, request):

@staticmethod
def _create_rhsm_cert_from_pem(unquoted_certificate):
get_rhsm()
try:
rhsm_cert = certificate.create_from_pem(unquoted_certificate)
except certificate.CertificateException:
Expand Down
2 changes: 1 addition & 1 deletion pulp_certguard/app/viewsets.py
Expand Up @@ -7,7 +7,7 @@
class RHSMCertGuardViewSet(ContentGuardViewSet):
"""RHSMCertGuard API Viewsets."""

endpoint_name = 'RHSM'
endpoint_name = 'rhsm'
queryset = RHSMCertGuard.objects.all()
serializer_class = RHSMCertGuardSerializer
filterset_class = ContentGuardFilter
Expand Down

0 comments on commit cb56475

Please sign in to comment.