Enhance the OperatorCloud constructor
Set the default for endpoint_type to 'admin' and expand the docstring a smidge. Change-Id: Iab8bafcc497bf5d4a221581158371712db5b736b
This commit is contained in:
parent
d20f9b3c6c
commit
f495ebd73f
@ -2124,8 +2124,25 @@ class OpenStackCloud(object):
|
||||
|
||||
class OperatorCloud(OpenStackCloud):
|
||||
"""Represent a privileged/operator connection to an OpenStack Cloud.
|
||||
|
||||
`OperatorCloud` is the entry point for all admin operations, regardless
|
||||
of which OpenStack service those operations are for.
|
||||
|
||||
See the :class:`OpenStackCloud` class for a description of most options.
|
||||
`OperatorCloud` overrides the default value of `endpoint_type` from
|
||||
`public` to `admin`.
|
||||
|
||||
:param string endpoint_type: The type of endpoint to get for services
|
||||
from the service catalog. Valid types are
|
||||
`public` ,`internal` or `admin`. (optional,
|
||||
defaults to `admin`)
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(OperatorCloud, self).__init__(*args, **kwargs)
|
||||
if 'endpoint_type' not in kwargs:
|
||||
self.endpoint_type = 'admin'
|
||||
|
||||
@property
|
||||
def auth_token(self):
|
||||
if self.auth_type in (None, "None", ''):
|
||||
|
Loading…
x
Reference in New Issue
Block a user