rca methods¶
-
class
ecl.rca.v1._proxy.
Proxy
(session)[source]¶ Bases:
ecl.proxy2.BaseProxy
-
create_user
(password)[source]¶ Create VPN user. One VPN user can create per one tenant. And username equal to tenant_id.
Parameters: password – The passowrd of VPN connection. Available character is 8-127 character of alphabet[a-zA-Z], number[0-9] and Symbols[.-_/*+,!#$%&()~|]. Returns: The results of user creation Return type: User
-
delete_user
(username)[source]¶ Delete VPN user.
Parameters: username – The username of VPN user. Returns: None
-
find_user
(name_or_id, ignore_missing=True)[source]¶ Find a single VPN user.
Parameters: - name_or_id – The name or ID of a user.
- ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
Returns: One
User
or None
-
get_user
(username)[source]¶ Show VPN user.
Parameters: username – Query user name Returns: One User
or :class:`~ecl.exceptions.ResourceNotFound`when no resource can be found.
-
update_user
(username, password)[source]¶ Update VPN user.
Parameters: - username – The username of VPN user.
- password – The passowrd of VPN connection. Available character is 8-127 character of alphabet[a-zA-Z], number[0-9] and Symbols[ .-_/*+,!#$%&()~|].
Returns:
-
-
class
ecl.rca.v1._proxy.
VersionSession
(profile, user_agent=None, **kwargs)[source]¶ Bases:
ecl.session.Session
-
get_endpoint
(auth=None, interface='public', service_type=None, **kwargs)[source]¶ Override get endpoint to automate endpoint filtering
This method uses the service catalog to find the root URI of each service and then gets all available versions directly from the service, not from the service catalog.
Endpoints are cached per service type and interface combination so that they’re only requested from the remote service once per instance of this class.
-
user¶
-
class
ecl.rca.v1.user.
User
(synchronized=False, **attrs)[source]¶ Bases:
ecl.resource2.Resource
-
allow_create
= True¶
-
allow_delete
= True¶
-
allow_get
= True¶
-
allow_list
= True¶
-
allow_update
= True¶
-
base_path
= '/users'¶
-
classmethod
find
(session, name_or_id, ignore_missing=True, **params)[source]¶ Find a resource by its name or id.
Parameters: - session (
Session
) – The session to use for making this request. - name_or_id – This resource’s identifier, if needed by
the request. The default is
None
. - ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource. - params (dict) – Any additional parameters to be passed into
underlying methods, such as to
existing()
in order to pass on URI parameters.
Returns: The
Resource
object matching the given name or id or None if nothing matches.Raises: ecl.exceptions.DuplicateResource
if more than one resource is found for this request.Raises: ecl.exceptions.ResourceNotFound
if nothing is found and ignore_missing isFalse
.- session (
-
name
= None¶ User’s name of VPN connection.
-
password
= None¶ User’s password of VPN connection. This parameter is only included in the response of Create User.
-
resource_key
= 'user'¶
-
resources_key
= 'users'¶
-
service
= {'region_name': None, 'service_name': None, 'interface': 'public', 'version': None, 'service_type': 'rca', 'requires_project_id': False, 'api_version': None}¶
-
vpn_endpoints
= None¶ VPN user information list id = resource2.Body(‘name’, alternate_id=True)
-