Fix spelling of HATEOAS

We've misspelled HATEOAS in several places.  This CR fixes those
misspellings.

Change-Id: I2daa92e8b6ba3a978bea47d81090e72918458634
This commit is contained in:
Steve Heyman 2015-10-17 12:08:20 -05:00
parent b463002c99
commit 546003b03c
13 changed files with 36 additions and 36 deletions

View File

@ -13,7 +13,7 @@ from barbican.common import utils
def convert_resource_id_to_href(resource_slug, resource_id):
"""Convert the resouce ID to a HATEOS-style href with resource slug."""
"""Convert the resouce ID to a HATEOAS-style href with resource slug."""
if resource_id:
resource = '{slug}/{id}'.format(slug=resource_slug, id=resource_id)
else:
@ -22,38 +22,38 @@ def convert_resource_id_to_href(resource_slug, resource_id):
def convert_secret_to_href(secret_id):
"""Convert the secret IDs to a HATEOS-style href."""
"""Convert the secret IDs to a HATEOAS-style href."""
return convert_resource_id_to_href('secrets', secret_id)
def convert_order_to_href(order_id):
"""Convert the order IDs to a HATEOS-style href."""
"""Convert the order IDs to a HATEOAS-style href."""
return convert_resource_id_to_href('orders', order_id)
def convert_container_to_href(container_id):
"""Convert the container IDs to a HATEOS-style href."""
"""Convert the container IDs to a HATEOAS-style href."""
return convert_resource_id_to_href('containers', container_id)
def convert_transport_key_to_href(transport_key_id):
"""Convert the transport key IDs to a HATEOS-style href."""
"""Convert the transport key IDs to a HATEOAS-style href."""
return convert_resource_id_to_href('transport_keys', transport_key_id)
def convert_consumer_to_href(consumer_id):
"""Convert the consumer ID to a HATEOS-style href."""
"""Convert the consumer ID to a HATEOAS-style href."""
return convert_resource_id_to_href('consumers', consumer_id) + '/consumers'
def convert_certificate_authority_to_href(ca_id):
"""Convert the ca ID to a HATEOS-style href."""
"""Convert the ca ID to a HATEOAS-style href."""
return convert_resource_id_to_href('cas', ca_id)
# TODO(hgedikli) handle list of fields in here
def convert_to_hrefs(fields):
"""Convert id's within a fields dict to HATEOS-style hrefs."""
"""Convert id's within a fields dict to HATEOAS-style hrefs."""
if 'secret_id' in fields:
fields['secret_ref'] = convert_secret_to_href(fields['secret_id'])
del fields['secret_id']
@ -78,7 +78,7 @@ def convert_to_hrefs(fields):
def convert_list_to_href(resources_name, offset, limit):
"""Supports pretty output of paged-list hrefs.
Convert the offset/limit info to a HATEOS-style href
Convert the offset/limit info to a HATEOAS-style href
suitable for use in a list navigation paging interface.
"""
resource = '{0}?limit={1}&offset={2}'.format(resources_name, limit,
@ -89,7 +89,7 @@ def convert_list_to_href(resources_name, offset, limit):
def previous_href(resources_name, offset, limit):
"""Supports pretty output of previous-page hrefs.
Create a HATEOS-style 'previous' href suitable for use in a list
Create a HATEOAS-style 'previous' href suitable for use in a list
navigation paging interface, assuming the provided values are the
currently viewed page.
"""
@ -100,7 +100,7 @@ def previous_href(resources_name, offset, limit):
def next_href(resources_name, offset, limit):
"""Supports pretty output of next-page hrefs.
Create a HATEOS-style 'next' href suitable for use in a list
Create a HATEOAS-style 'next' href suitable for use in a list
navigation paging interface, assuming the provided values are the
currently viewed page.
"""

View File

@ -56,7 +56,7 @@ def allow_all_content_types(f):
def hostname_for_refs(resource=None):
"""Return the HATEOS-style return URI reference for this service."""
"""Return the HATEOAS-style return URI reference for this service."""
ref = ['{base}/{version}'.format(base=CONF.host_href, version=API_VERSION)]
if resource:
ref.append('/' + resource)

View File

@ -207,8 +207,8 @@ class CertificateEventPluginBase(object):
"""Notify that a certificate has been generated and is ready to use.
:param project_id: Project ID associated with this certificate
:param order_ref: HATEOS reference URI to the submitted Barbican Order
:param container_ref: HATEOS reference URI to the Container storing
:param order_ref: HATEOAS reference URI to the submitted Barbican Order
:param container_ref: HATEOAS reference URI to the Container storing
the certificate
:returns: None
"""
@ -220,7 +220,7 @@ class CertificateEventPluginBase(object):
"""Notify that the certificate authority (CA) isn't available.
:param project_id: Project ID associated with this order
:param order_ref: HATEOS reference URI to the submitted Barbican Order
:param order_ref: HATEOAS reference URI to the submitted Barbican Order
:param error_msg: Error message if it is available
:param retry_in_msec: Delay before attempting to talk to the CA again.
If this is 0, then no attempt will be made.

View File

@ -140,8 +140,8 @@ class SimpleCertificateEventPlugin(cert.CertificateEventPluginBase):
"""Notify that a certificate has been generated and is ready to use.
:param project_id: Project ID associated with this certificate
:param order_ref: HATEOS reference URI to the submitted Barbican Order
:param container_ref: HATEOS reference URI to the Container storing
:param order_ref: HATEOAS reference URI to the submitted Barbican Order
:param container_ref: HATEOAS reference URI to the Container storing
the certificate
:returns: None
"""
@ -152,7 +152,7 @@ class SimpleCertificateEventPlugin(cert.CertificateEventPluginBase):
"""Notify that the certificate authority (CA) isn't available.
:param project_id: Project ID associated with this order
:param order_ref: HATEOS reference URI to the submitted Barbican Order
:param order_ref: HATEOAS reference URI to the submitted Barbican Order
:param error_msg: Error message if it is available
:param retry_in_msec: Delay before attempting to talk to the CA again.
If this is 0, then no attempt will be made.

View File

@ -173,7 +173,7 @@ def demo_retrieve_container_list():
def demo_delete_secret(secret_ref):
"""Delete secret by its HATEOS reference"""
"""Delete secret by its HATEOAS reference"""
ep_delete = secret_ref
# DELETE secret:
@ -184,7 +184,7 @@ def demo_delete_secret(secret_ref):
def demo_delete_container(container_ref):
"""Delete container by its HATEOS reference"""
"""Delete container by its HATEOAS reference"""
ep_delete = container_ref
# DELETE container:

View File

@ -81,12 +81,12 @@ Response Attributes
+----------------+---------+--------------------------------------------------------------+
| total | integer | The total number of configured project CAs records. |
+----------------+---------+--------------------------------------------------------------+
| next | string | A HATEOS url to retrieve the next set of CAs based on |
| next | string | A HATEOAS url to retrieve the next set of CAs based on |
| | | the offset and limit parameters. This attribute is only |
| | | available when the total number of secrets is greater than |
| | | offset and limit parameter combined. |
+----------------+---------+--------------------------------------------------------------+
| previous | string | A HATEOS url to retrieve the previous set of CAs based |
| previous | string | A HATEOAS url to retrieve the previous set of CAs based |
| | | on the offset and limit parameters. This attribute is only |
| | | available when the request offset is greater than 0. |
+----------------+---------+--------------------------------------------------------------+
@ -169,12 +169,12 @@ Response Attributes
+----------------+---------+--------------------------------------------------------------+
| total | integer | The total number of configured project CAs records. |
+----------------+---------+--------------------------------------------------------------+
| next | string | A HATEOS url to retrieve the next set of CAs based on |
| next | string | A HATEOAS url to retrieve the next set of CAs based on |
| | | the offset and limit parameters. This attribute is only |
| | | available when the total number of secrets is greater than |
| | | offset and limit parameter combined. |
+----------------+---------+--------------------------------------------------------------+
| previous | string | A HATEOS url to retrieve the previous set of CAs based |
| previous | string | A HATEOAS url to retrieve the previous set of CAs based |
| | | on the offset and limit parameters. This attribute is only |
| | | available when the request offset is greater than 0. |
+----------------+---------+--------------------------------------------------------------+

View File

@ -33,13 +33,13 @@ Response Attributes
+------------+---------+--------------------------------------------------------+
| total | integer | The total number of containers available to the user |
+------------+---------+--------------------------------------------------------+
| next | string | A HATEOS url to retrieve the next set of containers |
| next | string | A HATEOAS url to retrieve the next set of containers |
| | | based on the offset and limit parameters. This |
| | | attribute is only available when the total number of |
| | | containers is greater than offset and limit parameter |
| | | combined. |
+------------+---------+--------------------------------------------------------+
| previous | string | A HATEOS url to retrieve the previous set of |
| previous | string | A HATEOAS url to retrieve the previous set of |
| | | containers based on the offset and limit parameters. |
| | | This attribute is only available when the request |
| | | offset is greater than 0. |

View File

@ -188,12 +188,12 @@ Response Attributes
+----------------+---------+--------------------------------------------------------------+
| total | integer | The total number of configured project quotas records. |
+----------------+---------+--------------------------------------------------------------+
| next | string | A HATEOS url to retrieve the next set of quotas based on |
| next | string | A HATEOAS url to retrieve the next set of quotas based on |
| | | the offset and limit parameters. This attribute is only |
| | | available when the total number of secrets is greater than |
| | | offset and limit parameter combined. |
+----------------+---------+--------------------------------------------------------------+
| previous | string | A HATEOS url to retrieve the previous set of quotas based |
| previous | string | A HATEOAS url to retrieve the previous set of quotas based |
| | | on the offset and limit parameters. This attribute is only |
| | | available when the request offset is greater than 0. |
+----------------+---------+--------------------------------------------------------------+

View File

@ -50,12 +50,12 @@ Response Attributes
+----------+---------+--------------------------------------------------------------+
| total | integer | The total number of secrets available to the user. |
+----------+---------+--------------------------------------------------------------+
| next | string | A HATEOS url to retrieve the next set of secrets based on |
| next | string | A HATEOAS url to retrieve the next set of secrets based on |
| | | the offset and limit parameters. This attribute is only |
| | | available when the total number of secrets is greater than |
| | | offset and limit parameter combined. |
+----------+---------+--------------------------------------------------------------+
| previous | string | A HATEOS url to retrieve the previous set of secrets based |
| previous | string | A HATEOAS url to retrieve the previous set of secrets based |
| | | on the offset and limit parameters. This attribute is only |
| | | available when the request offset is greater than 0. |
+----------+---------+--------------------------------------------------------------+

View File

@ -11,7 +11,7 @@ bind_host = 0.0.0.0
# Port to bind the API server to
bind_port = 9311
# Host name, for use in HATEOS-style references
# Host name, for use in HATEOAS-style references
# Note: Typically this would be the load balanced endpoint that clients would use
# communicate back with this service.
host_href = http://localhost:9311

View File

@ -108,7 +108,7 @@ class CABehaviors(base_behaviors.BaseBehaviors):
expected_fail=False, use_auth=True, user_name=None):
"""Delete a secret.
:param ca_ref: HATEOS ref of the secret to be deleted
:param ca_ref: HATEOAS ref of the secret to be deleted
:param extra_headers: Optional HTTP headers to add to the request
:param expected_fail: If test is expected to fail the deletion
:param use_auth: Boolean for whether to send authentication headers

View File

@ -106,7 +106,7 @@ class OrderBehaviors(base_behaviors.BaseBehaviors):
user_name=None, use_auth=True):
"""Delete an order.
:param order_ref: HATEOS ref of the order to be deleted
:param order_ref: HATEOAS ref of the order to be deleted
:param extra_headers: Optional HTTP headers to add to the request
:param expected_fail: Flag telling the delete whether or not this
operation is expected to fail (ie coming

View File

@ -53,7 +53,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
user_name=None):
"""Updates a secret's payload data.
:param secret_ref: HATEOS ref of the secret to be updated
:param secret_ref: HATEOAS ref of the secret to be updated
:param payload: new payload to be sent to server
:param payload_content_type: value for the Content-Type header
:param payload_content_encoding: value for the Content-Encoding header
@ -107,7 +107,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
def get_secret_metadata(self, secret_ref, use_auth=True, user_name=None):
"""Retrieves a secret's metadata.
:param secret_ref: HATEOS ref of the secret to be retrieved
:param secret_ref: HATEOAS ref of the secret to be retrieved
:param use_auth: Boolean for whether to send authentication headers
:param user_name: The user name used to get the metadata
:return: A request response object
@ -151,7 +151,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
expected_fail=False, use_auth=True, user_name=None):
"""Delete a secret.
:param secret_ref: HATEOS ref of the secret to be deleted
:param secret_ref: HATEOAS ref of the secret to be deleted
:param extra_headers: Optional HTTP headers to add to the request
:param expected_fail: If test is expected to fail the deletion
:param use_auth: Boolean for whether to send authentication headers