Merge "Clean up document warnings"

This commit is contained in:
Jenkins
2015-07-29 21:11:34 +00:00
committed by Gerrit Code Review
2 changed files with 14 additions and 9 deletions

View File

@@ -41,23 +41,29 @@ class Instance(resource.Resource):
volume = resource.prop('volume') volume = resource.prop('volume')
def enable_root_user(self, session): def enable_root_user(self, session):
"""Enable login for the root user """Enable login for the root user.
This operation enables login from any host for the root user This operation enables login from any host for the root user
and provides the user with a generated root password. and provides the user with a generated root password.
:param session: The session to use for making this request.
:type session: :class:`~openstack.session.Session`
:returns: A dictionary with keys ``name`` and ``password`` specifying :returns: A dictionary with keys ``name`` and ``password`` specifying
the login credentials. the login credentials.
""" """
url = utils.urljoin(self.base_path, self.id, 'root') url = utils.urljoin(self.base_path, self.id, 'root')
resp = session.post(url, service=self.service).body resp = session.post(url, service=self.service).body
return resp['user'] return resp['user']
def is_root_enabled(self, session): def is_root_enabled(self, session):
"""Determine if root is enabled on an instance """Determine if root is enabled on an instance.
Determine if root is enabled on this particular instance.
:param session: The session to use for making this request.
:type session: :class:`~openstack.session.Session`
:returns: ``True`` if root user is enabled for a specified database :returns: ``True`` if root user is enabled for a specified database
instance or ``False`` otherwise. instance or ``False`` otherwise.
""" """
url = utils.urljoin(self.base_path, self.id, 'root') url = utils.urljoin(self.base_path, self.id, 'root')
resp = session.get(url, service=self.service).body resp = session.get(url, service=self.service).body

View File

@@ -36,13 +36,12 @@ class Endpoint(resource.Resource):
#: following values: #: following values:
#: #:
#: - `public`: intended for consumption by end users, generally on a #: - `public`: intended for consumption by end users, generally on a
#: publicly available network interface #: publicly available network interface
#:
#: - `internal`: not intended for consumption by end users, generally on an #: - `internal`: not intended for consumption by end users, generally on an
#: unmetered internal network interface #: unmetered internal network interface
#:
#: - `admin`: intended only for consumption by those needing administrative #: - `admin`: intended only for consumption by those needing administrative
#: access to the service, generally on a secure network interface #: access to the service, generally on a secure network interface
#:
#: *Type: string* #: *Type: string*
interface = resource.prop('interface') interface = resource.prop('interface')
#: Represents the containing region of the service endpoint. *New in v3.2* #: Represents the containing region of the service endpoint. *New in v3.2*