eclcli 4.1.0__py3-none-any.whl → 4.2.0.dev351__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of eclcli might be problematic. Click here for more details.
- eclcli/iam/client.py +3 -3
- eclcli/mlb/v1/mlb_certificate.py +2 -2
- eclcli/sss/client.py +3 -5
- eclcli/sss/sssclient/__init__.py +2 -2
- eclcli/sss/sssclient/{v1 → v2}/client.py +54 -30
- eclcli/sss/{v1 → v2}/contract.py +1 -35
- eclcli/sss/{v1 → v2}/tenant.py +7 -41
- eclcli/sss/{v1 → v2}/user.py +2 -0
- eclcli/sss/v2/workspace.py +195 -0
- eclcli/vnf/v1/virtual_network_appliance.py +39 -0
- {eclcli-4.1.0.dist-info → eclcli-4.2.0.dev351.dist-info}/AUTHORS +1 -0
- {eclcli-4.1.0.dist-info → eclcli-4.2.0.dev351.dist-info}/METADATA +23 -23
- {eclcli-4.1.0.dist-info → eclcli-4.2.0.dev351.dist-info}/RECORD +25 -26
- {eclcli-4.1.0.dist-info → eclcli-4.2.0.dev351.dist-info}/WHEEL +1 -1
- {eclcli-4.1.0.dist-info → eclcli-4.2.0.dev351.dist-info}/entry_points.txt +29 -26
- eclcli/sss/v1/role.py +0 -63
- eclcli-4.1.0.dist-info/pbr.json +0 -1
- /eclcli/iam/{v1 → v2}/__init__.py +0 -0
- /eclcli/iam/{v1 → v2}/group.py +0 -0
- /eclcli/iam/{v1 → v2}/role.py +0 -0
- /eclcli/iam/{v1 → v2}/user.py +0 -0
- /eclcli/sss/sssclient/{v1 → v2}/__init__.py +0 -0
- /eclcli/sss/{v1 → v2}/__init__.py +0 -0
- /eclcli/sss/{v1 → v2}/api_keypair.py +0 -0
- /eclcli/sss/{v1 → v2}/channel.py +0 -0
- {eclcli-4.1.0.dist-info → eclcli-4.2.0.dev351.dist-info}/LICENSE +0 -0
- {eclcli-4.1.0.dist-info → eclcli-4.2.0.dev351.dist-info}/top_level.txt +0 -0
eclcli/iam/client.py
CHANGED
|
@@ -5,18 +5,18 @@ from eclcli.common import utils
|
|
|
5
5
|
LOG = logging.getLogger(__name__)
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
DEFAULT_API_VERSION = '
|
|
8
|
+
DEFAULT_API_VERSION = '2'
|
|
9
9
|
API_VERSION_OPTION = 'os_iam_api_version'
|
|
10
10
|
API_NAME = "iam"
|
|
11
11
|
API_VERSIONS = {
|
|
12
|
-
"
|
|
12
|
+
"2": "iamclient.v2.client.Client",
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
_iam_api_version = None
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def make_client(instance):
|
|
19
|
-
from eclcli.sss.sssclient.
|
|
19
|
+
from eclcli.sss.sssclient.v2 import client as iam_client
|
|
20
20
|
|
|
21
21
|
if _iam_api_version is not None:
|
|
22
22
|
version = _iam_api_version
|
eclcli/mlb/v1/mlb_certificate.py
CHANGED
|
@@ -273,8 +273,8 @@ class UploadCertificate(command.Command):
|
|
|
273
273
|
try:
|
|
274
274
|
with open(content_path, 'rb') as f:
|
|
275
275
|
certificate_content = base64.b64encode(f.read()).decode()
|
|
276
|
-
except
|
|
277
|
-
msg = "content file %s
|
|
276
|
+
except OSError as e:
|
|
277
|
+
msg = "Failed to open/read content file %s: %s"
|
|
278
278
|
raise exceptions.CommandError(msg % (content_path, e))
|
|
279
279
|
|
|
280
280
|
client.upload_certificate(
|
eclcli/sss/client.py
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
|
|
3
|
-
from eclcli.common import utils
|
|
4
|
-
|
|
5
3
|
|
|
6
4
|
LOG = logging.getLogger(__name__)
|
|
7
5
|
|
|
8
|
-
DEFAULT_API_VERSION = '
|
|
6
|
+
DEFAULT_API_VERSION = '2'
|
|
9
7
|
API_VERSION_OPTION = 'os_sss_api_version'
|
|
10
8
|
API_NAME = "sss"
|
|
11
9
|
API_VERSIONS = {
|
|
12
|
-
"
|
|
10
|
+
"2": "sssclient.v2.client.Client",
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
def make_client(instance):
|
|
17
15
|
"""Returns a network proxy"""
|
|
18
|
-
from .sssclient.
|
|
16
|
+
from .sssclient.v2 import client as sss_client
|
|
19
17
|
c = sss_client.Client(session=instance.session)
|
|
20
18
|
return c
|
|
21
19
|
|
eclcli/sss/sssclient/__init__.py
CHANGED
|
@@ -17,8 +17,8 @@ from ..i18n import _
|
|
|
17
17
|
_logger = logging.getLogger(__name__)
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def
|
|
21
|
-
"""Exception handler for API
|
|
20
|
+
def exception_handler_v2(status_code, error_content):
|
|
21
|
+
"""Exception handler for API v2 client.
|
|
22
22
|
|
|
23
23
|
This routine generates the appropriate SSS exception according to
|
|
24
24
|
the contents of the response body.
|
|
@@ -90,7 +90,7 @@ class APIParamsCall(object):
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
class ClientBase(object):
|
|
93
|
-
"""Client for the OpenStack SSS
|
|
93
|
+
"""Client for the OpenStack SSS v2 API.
|
|
94
94
|
|
|
95
95
|
:param string username: Username for authentication. (optional)
|
|
96
96
|
:param string user_id: User ID for authentication. (optional)
|
|
@@ -129,7 +129,7 @@ class ClientBase(object):
|
|
|
129
129
|
|
|
130
130
|
Example::
|
|
131
131
|
|
|
132
|
-
from sssclient.
|
|
132
|
+
from sssclient.v2 import client
|
|
133
133
|
sss = client.Client(username=USER,
|
|
134
134
|
password=PASS,
|
|
135
135
|
tenant_name=TENANT_NAME,
|
|
@@ -145,7 +145,7 @@ class ClientBase(object):
|
|
|
145
145
|
EXTED_PLURALS = {}
|
|
146
146
|
|
|
147
147
|
def __init__(self, **kwargs):
|
|
148
|
-
"""Initialize a new client for the SSS
|
|
148
|
+
"""Initialize a new client for the SSS v2 API."""
|
|
149
149
|
super(ClientBase, self).__init__()
|
|
150
150
|
self.retries = kwargs.pop('retries', 0)
|
|
151
151
|
self.raise_errors = kwargs.pop('raise_errors', True)
|
|
@@ -166,7 +166,7 @@ class ClientBase(object):
|
|
|
166
166
|
# SSS error
|
|
167
167
|
des_error_body = {'message': response_body}
|
|
168
168
|
# Raise the appropriate exception
|
|
169
|
-
|
|
169
|
+
exception_handler_v2(status_code, des_error_body)
|
|
170
170
|
|
|
171
171
|
def do_request(self, method, action, body=None, headers=None, params=None):
|
|
172
172
|
# Add format and tenant_id
|
|
@@ -347,7 +347,7 @@ class Client(ClientBase):
|
|
|
347
347
|
|
|
348
348
|
@APIParamsCall
|
|
349
349
|
def create_user(self, body=None, *args, **_params):
|
|
350
|
-
"""Creates a certain user in SSS
|
|
350
|
+
"""Creates a certain user in SSS."""
|
|
351
351
|
return self.post(self.user_create_path, body=body)
|
|
352
352
|
|
|
353
353
|
#
|
|
@@ -374,25 +374,9 @@ class Client(ClientBase):
|
|
|
374
374
|
|
|
375
375
|
@APIParamsCall
|
|
376
376
|
def create_tenant(self, body=None, *args, **_params):
|
|
377
|
-
"""Creates a certain tenant in SSS
|
|
377
|
+
"""Creates a certain tenant in SSS."""
|
|
378
378
|
return self.post(self.tenant_create_path, body=body)
|
|
379
379
|
|
|
380
|
-
#
|
|
381
|
-
# Roles
|
|
382
|
-
#
|
|
383
|
-
role_create_path = "/roles" # for Create
|
|
384
|
-
role_delete_path = "/roles/tenants/%s/users/%s" # {tenant_id}, {user_id} for Delete
|
|
385
|
-
|
|
386
|
-
@APIParamsCall
|
|
387
|
-
def delete_role(self, tenant_id, user_id, **params):
|
|
388
|
-
"""Deletes a certain role in SSS."""
|
|
389
|
-
return self.delete(self.role_delete_path % (tenant_id, user_id))
|
|
390
|
-
|
|
391
|
-
@APIParamsCall
|
|
392
|
-
def create_role(self, body=None, *args, **_params):
|
|
393
|
-
"""Creates a certain role in SSS.."""
|
|
394
|
-
return self.post(self.role_create_path, body=body)
|
|
395
|
-
|
|
396
380
|
#
|
|
397
381
|
# API Keypair
|
|
398
382
|
#
|
|
@@ -419,7 +403,6 @@ class Client(ClientBase):
|
|
|
419
403
|
contract_show_path = "/contracts/%s" # {contract_id} for Show, Delete
|
|
420
404
|
contract_list_path = "/contracts?channel_id=%s" # {channel_id} for List
|
|
421
405
|
contract_create_path = "/contracts" # for Create
|
|
422
|
-
billing_show_path = "/contracts/%s/billing/%s" # for Show
|
|
423
406
|
with_target_contract = "%s/target_contract/%s" # for Show billing of each contract
|
|
424
407
|
|
|
425
408
|
@APIParamsCall
|
|
@@ -439,14 +422,55 @@ class Client(ClientBase):
|
|
|
439
422
|
|
|
440
423
|
@APIParamsCall
|
|
441
424
|
def create_contract(self, body=None, *args, **_params):
|
|
442
|
-
"""Creates a certain contract in SSS
|
|
425
|
+
"""Creates a certain contract in SSS."""
|
|
443
426
|
return self.post(self.contract_create_path, body=body)
|
|
444
427
|
|
|
428
|
+
#
|
|
429
|
+
# Workspace Endpoints
|
|
430
|
+
#
|
|
431
|
+
workspace_singular_path = "/workspaces/%s" # {workspace_id} for Show, Update and Delete
|
|
432
|
+
workspace_list_path = "/workspaces" # for List
|
|
433
|
+
workspace_create_path = "/workspaces" # for Create
|
|
434
|
+
workspace_role_assignment_add_path = "/workspace-roles" # for Create
|
|
435
|
+
workspace_role_assignment_delete_path = "/workspace-roles/workspaces/%s/users/%s" # for Delete
|
|
436
|
+
|
|
445
437
|
@APIParamsCall
|
|
446
|
-
def
|
|
447
|
-
"""Fetches
|
|
448
|
-
|
|
449
|
-
|
|
438
|
+
def list_workspaces(self, contract_id, **_params):
|
|
439
|
+
"""Fetches a list of all workspace in SSS."""
|
|
440
|
+
url = self.workspace_list_path
|
|
441
|
+
if contract_id:
|
|
442
|
+
url += "?contract_id=" + contract_id
|
|
443
|
+
return self.get(url, params=_params)
|
|
444
|
+
|
|
445
|
+
@APIParamsCall
|
|
446
|
+
def show_workspace(self, workspace_id, **_params):
|
|
447
|
+
"""Fetche information of a certain workspace_id in SSS."""
|
|
448
|
+
return self.get(self.workspace_singular_path % workspace_id, params=_params)
|
|
449
|
+
|
|
450
|
+
@APIParamsCall
|
|
451
|
+
def delete_workspace(self, workspace_id, **_params):
|
|
452
|
+
"""Deletes a certain workspace in SSS."""
|
|
453
|
+
return self.delete(self.workspace_singular_path % workspace_id, params=_params)
|
|
454
|
+
|
|
455
|
+
@APIParamsCall
|
|
456
|
+
def create_workspace(self, body=None, *args, **_params):
|
|
457
|
+
"""Creates a certain workspace in SSS."""
|
|
458
|
+
return self.post(self.workspace_create_path, body=body)
|
|
459
|
+
|
|
460
|
+
@APIParamsCall
|
|
461
|
+
def set_workspace(self, workspace_id, body=None, *args, **_params):
|
|
462
|
+
"""Sets a certain workspace in SSS."""
|
|
463
|
+
return self.put(self.workspace_singular_path % workspace_id, body=body)
|
|
464
|
+
|
|
465
|
+
@APIParamsCall
|
|
466
|
+
def delete_workspace_role_assignment(self, workspace_id, user_id, **_params):
|
|
467
|
+
"""Deletes a certain workspace-role in SSS."""
|
|
468
|
+
return self.delete(self.workspace_role_assignment_delete_path % (workspace_id, user_id), params=_params)
|
|
469
|
+
|
|
470
|
+
@APIParamsCall
|
|
471
|
+
def add_workspace_role_assignment(self, body=None, *args, **_params):
|
|
472
|
+
"""Adds a certain workspace-role in SSS."""
|
|
473
|
+
return self.post(self.workspace_role_assignment_add_path, body=body)
|
|
450
474
|
|
|
451
475
|
#
|
|
452
476
|
# IAM Endpoints
|
eclcli/sss/{v1 → v2}/contract.py
RENAMED
|
@@ -97,7 +97,7 @@ class CreateContract(command.ShowOne):
|
|
|
97
97
|
metavar='<boolean>',
|
|
98
98
|
type=utils.parse_bool,
|
|
99
99
|
choices=[True, False],
|
|
100
|
-
help='If this flag is set \'true\', notification
|
|
100
|
+
help='If this flag is set \'true\', notification email will be '
|
|
101
101
|
'sent to new user\'s email.'
|
|
102
102
|
)
|
|
103
103
|
parser.add_argument(
|
|
@@ -160,37 +160,3 @@ class DeleteContract(command.Command):
|
|
|
160
160
|
|
|
161
161
|
for contract_id in parsed_args.contract_id:
|
|
162
162
|
sss_client.delete_contract(contract_id)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
class ShowBilling(command.ShowOne):
|
|
166
|
-
_description = _("Show billing")
|
|
167
|
-
def get_parser(self, prog_name):
|
|
168
|
-
parser = super(ShowBilling, self).get_parser(prog_name)
|
|
169
|
-
parser.add_argument(
|
|
170
|
-
'contract_id',
|
|
171
|
-
metavar="<uuid>",
|
|
172
|
-
help="The contract ID getting more information"
|
|
173
|
-
)
|
|
174
|
-
parser.add_argument(
|
|
175
|
-
'target_month',
|
|
176
|
-
metavar="<target_month>",
|
|
177
|
-
help="target billing month with YYYY-MM format"
|
|
178
|
-
)
|
|
179
|
-
return parser
|
|
180
|
-
|
|
181
|
-
def take_action(self, parsed_args):
|
|
182
|
-
sss_client = self.app.client_manager.sss
|
|
183
|
-
contract_id = parsed_args.contract_id
|
|
184
|
-
target_month = parsed_args.target_month
|
|
185
|
-
billing = sss_client.show_billing(contract_id, target_month)
|
|
186
|
-
columns = utils.get_columns(billing)
|
|
187
|
-
obj = objectify(billing)
|
|
188
|
-
|
|
189
|
-
try:
|
|
190
|
-
obj.charge_data = json.dumps(obj.charge_data, indent=2)
|
|
191
|
-
except Exception:
|
|
192
|
-
# Ignore prettify if exception raised
|
|
193
|
-
pass
|
|
194
|
-
|
|
195
|
-
data = utils.get_item_properties(obj, columns)
|
|
196
|
-
return columns, data
|
eclcli/sss/{v1 → v2}/tenant.py
RENAMED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
|
|
3
3
|
from eclcli.common import command
|
|
4
|
-
from eclcli.common import exceptions
|
|
5
4
|
from eclcli.common import utils
|
|
6
5
|
from eclcli.i18n import _ # noqa
|
|
7
|
-
from eclcli.identity import common as identity_common
|
|
8
6
|
from ..sssclient.common.utils import objectify
|
|
9
7
|
|
|
10
8
|
|
|
@@ -23,6 +21,7 @@ class ListTenant(command.Lister):
|
|
|
23
21
|
'description',
|
|
24
22
|
'region',
|
|
25
23
|
'start_time',
|
|
24
|
+
'workspace_id',
|
|
26
25
|
)
|
|
27
26
|
column_headers = (
|
|
28
27
|
'ID',
|
|
@@ -30,6 +29,7 @@ class ListTenant(command.Lister):
|
|
|
30
29
|
'Description',
|
|
31
30
|
'Region',
|
|
32
31
|
'Start Time',
|
|
32
|
+
'Workspace ID',
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
data = [objectify(tenant)
|
|
@@ -67,62 +67,28 @@ class CreateTenant(command.ShowOne):
|
|
|
67
67
|
def get_parser(self, prog_name):
|
|
68
68
|
parser = super(CreateTenant, self).get_parser(prog_name)
|
|
69
69
|
parser.add_argument(
|
|
70
|
-
'
|
|
71
|
-
metavar='<
|
|
72
|
-
help=
|
|
73
|
-
)
|
|
74
|
-
parser.add_argument(
|
|
75
|
-
'description',
|
|
76
|
-
metavar='<description>',
|
|
77
|
-
help='Description for this tenant.'
|
|
70
|
+
'workspace_id',
|
|
71
|
+
metavar='<workspace_id>',
|
|
72
|
+
help='The workspace ID where the tenant will be created.'
|
|
78
73
|
)
|
|
79
74
|
parser.add_argument(
|
|
80
75
|
'region',
|
|
81
76
|
metavar='<region>',
|
|
82
77
|
help='Region this tenant belongs to. \'jp1\' is available as of now.',
|
|
83
78
|
)
|
|
84
|
-
parser.add_argument(
|
|
85
|
-
'--contract_id',
|
|
86
|
-
metavar='<contract_id>',
|
|
87
|
-
help='Contract which new tenant belongs to. If this parameter is not'
|
|
88
|
-
' designated, API user\'s contract implicitly designated.'
|
|
89
|
-
)
|
|
90
79
|
return parser
|
|
91
80
|
|
|
92
81
|
def take_action(self, parsed_args):
|
|
93
82
|
sss_client = self.app.client_manager.sss
|
|
94
83
|
|
|
95
84
|
body = {}
|
|
96
|
-
if parsed_args.
|
|
97
|
-
body['
|
|
98
|
-
if parsed_args.description is not None:
|
|
99
|
-
body['description'] = str(parsed_args.description)
|
|
85
|
+
if parsed_args.region is not None:
|
|
86
|
+
body['workspace_id'] = str(parsed_args.workspace_id)
|
|
100
87
|
if parsed_args.region is not None:
|
|
101
88
|
body['region'] = str(parsed_args.region)
|
|
102
|
-
if parsed_args.contract_id is not None:
|
|
103
|
-
body['contract_id'] = str(parsed_args.contract_id)
|
|
104
89
|
|
|
105
90
|
tenant = sss_client.create_tenant(body)
|
|
106
91
|
columns = utils.get_columns(tenant)
|
|
107
92
|
obj = objectify(tenant)
|
|
108
93
|
data = utils.get_item_properties(obj, columns)
|
|
109
94
|
return columns, data
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class DeleteTenant(command.Command):
|
|
113
|
-
_description = _("Delete tenant")
|
|
114
|
-
def get_parser(self, prog_name):
|
|
115
|
-
parser = super(DeleteTenant, self).get_parser(prog_name)
|
|
116
|
-
parser.add_argument(
|
|
117
|
-
'tenant_id',
|
|
118
|
-
metavar="<uuid>",
|
|
119
|
-
nargs="+",
|
|
120
|
-
help="Delete target tenant\'s tenant id."
|
|
121
|
-
)
|
|
122
|
-
return parser
|
|
123
|
-
|
|
124
|
-
def take_action(self, parsed_args):
|
|
125
|
-
sss_client = self.app.client_manager.sss
|
|
126
|
-
|
|
127
|
-
for tenant_id in parsed_args.tenant_id:
|
|
128
|
-
sss_client.delete_tenant(tenant_id)
|
eclcli/sss/{v1 → v2}/user.py
RENAMED
|
@@ -19,6 +19,7 @@ class ListUser(command.Lister):
|
|
|
19
19
|
'mail_address',
|
|
20
20
|
'user_id',
|
|
21
21
|
'contract_owner',
|
|
22
|
+
'super_user',
|
|
22
23
|
'contract_id'
|
|
23
24
|
)
|
|
24
25
|
column_headers = (
|
|
@@ -26,6 +27,7 @@ class ListUser(command.Lister):
|
|
|
26
27
|
'Address',
|
|
27
28
|
'User ID',
|
|
28
29
|
'Contract Owner',
|
|
30
|
+
'Superuser',
|
|
29
31
|
'Contract ID',
|
|
30
32
|
)
|
|
31
33
|
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
from eclcli.common import command, utils
|
|
4
|
+
from ..sssclient.common.utils import objectify
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ListWorkspace(command.Lister):
|
|
8
|
+
def get_parser(self, prog_name):
|
|
9
|
+
parser = super(ListWorkspace, self).get_parser(prog_name)
|
|
10
|
+
parser.add_argument(
|
|
11
|
+
'--contract_id',
|
|
12
|
+
metavar='<contract_id>',
|
|
13
|
+
help='Contract ID of Workspace information to be acquired'
|
|
14
|
+
)
|
|
15
|
+
return parser
|
|
16
|
+
|
|
17
|
+
def take_action(self, parsed_args):
|
|
18
|
+
sss_client = self.app.client_manager.sss
|
|
19
|
+
|
|
20
|
+
columns = (
|
|
21
|
+
'workspace_id',
|
|
22
|
+
'workspace_name',
|
|
23
|
+
'description',
|
|
24
|
+
'start_time',
|
|
25
|
+
)
|
|
26
|
+
column_headers = (
|
|
27
|
+
'ID',
|
|
28
|
+
'Name',
|
|
29
|
+
'Description',
|
|
30
|
+
'Start Time',
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
data = [objectify(workspace)
|
|
34
|
+
for workspace in sss_client.list_workspaces(parsed_args.contract_id).get('workspaces')]
|
|
35
|
+
|
|
36
|
+
return (column_headers,
|
|
37
|
+
(utils.get_item_properties(
|
|
38
|
+
s, columns,
|
|
39
|
+
) for s in data))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ShowWorkspace(command.ShowOne):
|
|
43
|
+
def get_parser(self, prog_name):
|
|
44
|
+
parser = super(ShowWorkspace, self).get_parser(prog_name)
|
|
45
|
+
parser.add_argument(
|
|
46
|
+
'workspace_id',
|
|
47
|
+
metavar="<workspace_id>",
|
|
48
|
+
help="ID of workspace to be shown"
|
|
49
|
+
)
|
|
50
|
+
return parser
|
|
51
|
+
|
|
52
|
+
def take_action(self, parsed_args):
|
|
53
|
+
sss_client = self.app.client_manager.sss
|
|
54
|
+
workspace = sss_client.show_workspace(parsed_args.workspace_id)
|
|
55
|
+
columns = utils.get_columns(workspace)
|
|
56
|
+
obj = objectify(workspace)
|
|
57
|
+
data = utils.get_item_properties(obj, columns)
|
|
58
|
+
return columns, data
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class CreateWorkspace(command.ShowOne):
|
|
62
|
+
def get_parser(self, prog_name):
|
|
63
|
+
parser = super(CreateWorkspace, self).get_parser(prog_name)
|
|
64
|
+
parser.add_argument(
|
|
65
|
+
'workspace_name',
|
|
66
|
+
metavar='<workspace_name>',
|
|
67
|
+
help="New workspace\'s name. This name need to be unique globally."
|
|
68
|
+
)
|
|
69
|
+
parser.add_argument(
|
|
70
|
+
'--description',
|
|
71
|
+
metavar='<description>',
|
|
72
|
+
help='Description for this workspace.'
|
|
73
|
+
)
|
|
74
|
+
parser.add_argument(
|
|
75
|
+
'--contract_id',
|
|
76
|
+
metavar='<contract_id>',
|
|
77
|
+
help='The Contract ID where the workspace will be created.'
|
|
78
|
+
)
|
|
79
|
+
return parser
|
|
80
|
+
|
|
81
|
+
def take_action(self, parsed_args):
|
|
82
|
+
sss_client = self.app.client_manager.sss
|
|
83
|
+
|
|
84
|
+
body = {}
|
|
85
|
+
if parsed_args.workspace_name is not None:
|
|
86
|
+
body['workspace_name'] = str(parsed_args.workspace_name)
|
|
87
|
+
if parsed_args.description is not None:
|
|
88
|
+
body['description'] = str(parsed_args.description)
|
|
89
|
+
if parsed_args.contract_id is not None:
|
|
90
|
+
body['contract_id'] = str(parsed_args.contract_id)
|
|
91
|
+
|
|
92
|
+
workspace = sss_client.create_workspace(body)
|
|
93
|
+
columns = utils.get_columns(workspace)
|
|
94
|
+
obj = objectify(workspace)
|
|
95
|
+
data = utils.get_item_properties(obj, columns)
|
|
96
|
+
return columns, data
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class SetWorkspace(command.ShowOne):
|
|
100
|
+
def get_parser(self, prog_name):
|
|
101
|
+
parser = super(SetWorkspace, self).get_parser(prog_name)
|
|
102
|
+
parser.add_argument(
|
|
103
|
+
'workspace_id',
|
|
104
|
+
metavar="<workspace_id>",
|
|
105
|
+
help="ID of workspace to be update"
|
|
106
|
+
)
|
|
107
|
+
parser.add_argument(
|
|
108
|
+
'description',
|
|
109
|
+
metavar='<description>',
|
|
110
|
+
help="Description for this workspace."
|
|
111
|
+
)
|
|
112
|
+
return parser
|
|
113
|
+
|
|
114
|
+
def take_action(self, parsed_args):
|
|
115
|
+
sss_client = self.app.client_manager.sss
|
|
116
|
+
|
|
117
|
+
body = {}
|
|
118
|
+
if parsed_args.description is not None:
|
|
119
|
+
body['description'] = str(parsed_args.description)
|
|
120
|
+
|
|
121
|
+
sss_client.set_workspace(parsed_args.workspace_id, body)
|
|
122
|
+
workspace = sss_client.show_workspace(parsed_args.workspace_id)
|
|
123
|
+
columns = utils.get_columns(workspace)
|
|
124
|
+
obj = objectify(workspace)
|
|
125
|
+
data = utils.get_item_properties(obj, columns)
|
|
126
|
+
return columns, data
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class DeleteWorkspace(command.Command):
|
|
130
|
+
def get_parser(self, prog_name):
|
|
131
|
+
parser = super(DeleteWorkspace, self).get_parser(prog_name)
|
|
132
|
+
parser.add_argument(
|
|
133
|
+
'workspace_id',
|
|
134
|
+
metavar="<workspace_id>",
|
|
135
|
+
help="ID of workspace to be delete"
|
|
136
|
+
)
|
|
137
|
+
return parser
|
|
138
|
+
|
|
139
|
+
def take_action(self, parsed_args):
|
|
140
|
+
sss_client = self.app.client_manager.sss
|
|
141
|
+
|
|
142
|
+
sss_client.delete_workspace(parsed_args.workspace_id)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class AddWorkspaceRoleAssignment(command.ShowOne):
|
|
146
|
+
def get_parser(self, prog_name):
|
|
147
|
+
parser = super(AddWorkspaceRoleAssignment, self).get_parser(prog_name)
|
|
148
|
+
parser.add_argument(
|
|
149
|
+
'workspace_id',
|
|
150
|
+
metavar="<workspace_id>",
|
|
151
|
+
help="Workspace ID for workspace role"
|
|
152
|
+
)
|
|
153
|
+
parser.add_argument(
|
|
154
|
+
'user_id',
|
|
155
|
+
metavar='<user_id>',
|
|
156
|
+
help='User ID for workspace role'
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
return parser
|
|
160
|
+
|
|
161
|
+
def take_action(self, parsed_args):
|
|
162
|
+
sss_client = self.app.client_manager.sss
|
|
163
|
+
|
|
164
|
+
body = {}
|
|
165
|
+
if parsed_args.user_id is not None:
|
|
166
|
+
body['user_id'] = str(parsed_args.user_id)
|
|
167
|
+
if parsed_args.workspace_id is not None:
|
|
168
|
+
body['workspace_id'] = str(parsed_args.workspace_id)
|
|
169
|
+
|
|
170
|
+
workspace_role = sss_client.add_workspace_role_assignment(body)
|
|
171
|
+
columns = utils.get_columns(workspace_role)
|
|
172
|
+
obj = objectify(workspace_role)
|
|
173
|
+
data = utils.get_item_properties(obj, columns)
|
|
174
|
+
return columns, data
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class DeleteWorkspaceRoleAssignment(command.Command):
|
|
178
|
+
def get_parser(self, prog_name):
|
|
179
|
+
parser = super(DeleteWorkspaceRoleAssignment, self).get_parser(prog_name)
|
|
180
|
+
parser.add_argument(
|
|
181
|
+
'workspace_id',
|
|
182
|
+
metavar="<workspace_id>",
|
|
183
|
+
help="Workspace ID for workspace role"
|
|
184
|
+
)
|
|
185
|
+
parser.add_argument(
|
|
186
|
+
'user_id',
|
|
187
|
+
metavar='<user_id>',
|
|
188
|
+
help='User ID for workspace role'
|
|
189
|
+
)
|
|
190
|
+
return parser
|
|
191
|
+
|
|
192
|
+
def take_action(self, parsed_args):
|
|
193
|
+
sss_client = self.app.client_manager.sss
|
|
194
|
+
|
|
195
|
+
sss_client.delete_workspace_role_assignment(parsed_args.workspace_id, parsed_args.user_id)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
+
import base64
|
|
2
3
|
|
|
3
4
|
try:
|
|
4
5
|
import json
|
|
@@ -164,6 +165,13 @@ class CreateVirtualNetworkAppliance(command.ShowOne):
|
|
|
164
165
|
help=_('Availability zone that virtual network appliance '
|
|
165
166
|
'will be created'),
|
|
166
167
|
)
|
|
168
|
+
parser.add_argument(
|
|
169
|
+
'--initial-config',
|
|
170
|
+
metavar="<format=enum{set,text},data=file>",
|
|
171
|
+
help=_("Initial configuration for virtual network appliance "
|
|
172
|
+
"format: format of initial configuration data. (set/text)"
|
|
173
|
+
"data: file path of initial configuration data."),
|
|
174
|
+
)
|
|
167
175
|
|
|
168
176
|
return parser
|
|
169
177
|
|
|
@@ -271,6 +279,36 @@ class CreateVirtualNetworkAppliance(command.ShowOne):
|
|
|
271
279
|
|
|
272
280
|
interface_object.update(tmp)
|
|
273
281
|
|
|
282
|
+
initial_config_object = None
|
|
283
|
+
if parsed_args.initial_config:
|
|
284
|
+
config_dict = {"format": None, "data": None}
|
|
285
|
+
for item in parsed_args.initial_config.split(","):
|
|
286
|
+
parts = item.split('=')
|
|
287
|
+
if len(parts) == 2:
|
|
288
|
+
config_dict[parts[0].strip()] = parts[1].strip()
|
|
289
|
+
|
|
290
|
+
config_format = config_dict.get('format')
|
|
291
|
+
config_path = config_dict.get('data')
|
|
292
|
+
if not config_format or not config_path:
|
|
293
|
+
msg = _("You must specify both initial_config.format and initial_config.data (e.g., --initial-config format=set,data=/path/to/config)")
|
|
294
|
+
raise exceptions.CommandError(msg)
|
|
295
|
+
if config_format not in ['set', 'text']:
|
|
296
|
+
msg = _("initial_config.format must be 'set' or 'text'")
|
|
297
|
+
raise exceptions.CommandError(msg)
|
|
298
|
+
|
|
299
|
+
config_data = None
|
|
300
|
+
try:
|
|
301
|
+
with open(config_path, 'rb') as f:
|
|
302
|
+
config_data = base64.b64encode(f.read()).decode()
|
|
303
|
+
except OSError as e:
|
|
304
|
+
msg = "Failed to open/read config file %s: %s"
|
|
305
|
+
raise exceptions.CommandError(msg % (config_path, e))
|
|
306
|
+
|
|
307
|
+
initial_config_object = {
|
|
308
|
+
'format': config_format,
|
|
309
|
+
'data': config_data,
|
|
310
|
+
}
|
|
311
|
+
|
|
274
312
|
plan_id = \
|
|
275
313
|
parsed_args.virtual_network_appliance_plan_id
|
|
276
314
|
|
|
@@ -293,6 +331,7 @@ class CreateVirtualNetworkAppliance(command.ShowOne):
|
|
|
293
331
|
default_gateway=default_gateway,
|
|
294
332
|
availability_zone=zone,
|
|
295
333
|
tags=tags,
|
|
334
|
+
initial_config=initial_config_object,
|
|
296
335
|
)
|
|
297
336
|
|
|
298
337
|
# Set plan name
|
|
@@ -19,6 +19,7 @@ a-oi-xon <91597807+a-oi-xon@users.noreply.github.com>
|
|
|
19
19
|
akaishizawa-n <135296314+akaishizawa-n@users.noreply.github.com>
|
|
20
20
|
anythingrandom <shreyas.shinde@ntt.com>
|
|
21
21
|
endoshi <42924605+endoshi@users.noreply.github.com>
|
|
22
|
+
guy555 <junya.katagai@ntt.com>
|
|
22
23
|
htysh <h.ohta@ntt.com>
|
|
23
24
|
htysh <htysh@users.noreply.github.com>
|
|
24
25
|
ikegami-shota <102566991+ikegami-shota@users.noreply.github.com>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: eclcli
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.2.0.dev351
|
|
4
4
|
Summary: CLI for Enterprise Cloud 2.0
|
|
5
5
|
Home-page: https://ecl.ntt.com
|
|
6
6
|
Author: NTT Communications
|
|
@@ -17,28 +17,28 @@ Classifier: Programming Language :: Python :: 3
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
License-File: AUTHORS
|
|
20
|
-
Requires-Dist: pbr >=1.6
|
|
21
|
-
Requires-Dist: six >=1.9.0
|
|
22
|
-
Requires-Dist: Babel !=2.3.0,!=2.3.1,!=2.3.2,!=2.3.3,!=2.4.0,>=1.3
|
|
23
|
-
Requires-Dist: cliff !=1.16.0,!=1.17.0,<3.7.0,>=1.15.0
|
|
24
|
-
Requires-Dist: cryptography >=2.9.2
|
|
25
|
-
Requires-Dist: eclsdk >=1.
|
|
26
|
-
Requires-Dist: future >=0.17.1
|
|
27
|
-
Requires-Dist: keystoneauth1 <=3.4.0,>=2.1.0
|
|
28
|
-
Requires-Dist: openstacksdk <=0.13.0
|
|
29
|
-
Requires-Dist: os-client-config >=1.13.1
|
|
30
|
-
Requires-Dist: oslo.config >=3.7.0
|
|
31
|
-
Requires-Dist: oslo.i18n >=2.1.0
|
|
32
|
-
Requires-Dist: oslo.utils >=3.5.0
|
|
33
|
-
Requires-Dist: pyparsing <3.0.0
|
|
34
|
-
Requires-Dist: python-glanceclient <=2.11.0,>=2.0.0
|
|
35
|
-
Requires-Dist: python-keystoneclient !=1.8.0,!=2.1.0,>=1.6.0
|
|
36
|
-
Requires-Dist: python-novaclient !=2.33.0,<=9.1.0,>=2.29.0
|
|
37
|
-
Requires-Dist: python-cinderclient <=4.3.0,>=1.3.1
|
|
38
|
-
Requires-Dist: requests >=2.20.0
|
|
39
|
-
Requires-Dist: stevedore >=1.5.0
|
|
40
|
-
Requires-Dist: json-merge-patch >=0.2
|
|
41
|
-
Requires-Dist: cmd2 <0.9.0,>0.8.3
|
|
20
|
+
Requires-Dist: pbr (>=1.6)
|
|
21
|
+
Requires-Dist: six (>=1.9.0)
|
|
22
|
+
Requires-Dist: Babel (!=2.3.0,!=2.3.1,!=2.3.2,!=2.3.3,!=2.4.0,>=1.3)
|
|
23
|
+
Requires-Dist: cliff (!=1.16.0,!=1.17.0,<3.7.0,>=1.15.0)
|
|
24
|
+
Requires-Dist: cryptography (>=2.9.2)
|
|
25
|
+
Requires-Dist: eclsdk (>=1.4.0)
|
|
26
|
+
Requires-Dist: future (>=0.17.1)
|
|
27
|
+
Requires-Dist: keystoneauth1 (<=3.4.0,>=2.1.0)
|
|
28
|
+
Requires-Dist: openstacksdk (<=0.13.0)
|
|
29
|
+
Requires-Dist: os-client-config (>=1.13.1)
|
|
30
|
+
Requires-Dist: oslo.config (>=3.7.0)
|
|
31
|
+
Requires-Dist: oslo.i18n (>=2.1.0)
|
|
32
|
+
Requires-Dist: oslo.utils (>=3.5.0)
|
|
33
|
+
Requires-Dist: pyparsing (<3.0.0)
|
|
34
|
+
Requires-Dist: python-glanceclient (<=2.11.0,>=2.0.0)
|
|
35
|
+
Requires-Dist: python-keystoneclient (!=1.8.0,!=2.1.0,>=1.6.0)
|
|
36
|
+
Requires-Dist: python-novaclient (!=2.33.0,<=9.1.0,>=2.29.0)
|
|
37
|
+
Requires-Dist: python-cinderclient (<=4.3.0,>=1.3.1)
|
|
38
|
+
Requires-Dist: requests (>=2.20.0)
|
|
39
|
+
Requires-Dist: stevedore (>=1.5.0)
|
|
40
|
+
Requires-Dist: json-merge-patch (>=0.2)
|
|
41
|
+
Requires-Dist: cmd2 (<0.9.0,>0.8.3)
|
|
42
42
|
|
|
43
43
|
Enterprise Cloud CLI
|
|
44
44
|
======================
|
|
@@ -132,11 +132,11 @@ eclcli/dns/v2/nameserver.py,sha256=cWwmw1RqaM8hZLbi5TR3HZPpfsVNwj26ppiLeHoZeWs,1
|
|
|
132
132
|
eclcli/dns/v2/record.py,sha256=L1e6Psr60W_UMwA00oEOae0ar67dtnXTPftuHBo-nCQ,9805
|
|
133
133
|
eclcli/dns/v2/zone.py,sha256=1dcT3LuqnDeVHSrOKPubwleGMTaW6jYBKRoC7uRy8c0,7103
|
|
134
134
|
eclcli/iam/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
135
|
-
eclcli/iam/client.py,sha256=
|
|
136
|
-
eclcli/iam/
|
|
137
|
-
eclcli/iam/
|
|
138
|
-
eclcli/iam/
|
|
139
|
-
eclcli/iam/
|
|
135
|
+
eclcli/iam/client.py,sha256=NBeC32s9jzsSZzqeodKYp63TJ0EngXLP52wqdM65UGw,1187
|
|
136
|
+
eclcli/iam/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
|
+
eclcli/iam/v2/group.py,sha256=70gxWN2rmv2i401jw8ooRJtmOElZlfBa1YldVzUP610,6542
|
|
138
|
+
eclcli/iam/v2/role.py,sha256=9K7pA8Erqke588LGyULponFKMj7qAwgHdPFIJpeaXZQ,4195
|
|
139
|
+
eclcli/iam/v2/user.py,sha256=Paf3GvBcsLky6JvFOQx_5vjDUb6DPdu_CdSXqPyWAJM,928
|
|
140
140
|
eclcli/identity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
141
|
eclcli/identity/client.py,sha256=PGbShwvEwVDTDh9HIWTZIkPgC2lA0rxKjJ6tMvy1iLA,2469
|
|
142
142
|
eclcli/identity/common.py,sha256=IFAAIIrKkndIfmOkGy3Vl85E1PvTfpuA2eS2EPqiZOM,6268
|
|
@@ -179,7 +179,7 @@ eclcli/image/v2/image.py,sha256=fUVCT28gCNIP0yBAAm-ntFZJajdbuAQOrIq_Q-4LNaQ,3426
|
|
|
179
179
|
eclcli/mlb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
180
180
|
eclcli/mlb/client.py,sha256=AmrS6iBusepOr13hoy3vHHNyj5Vmwg1rU30QHEBqRZM,188
|
|
181
181
|
eclcli/mlb/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
182
|
-
eclcli/mlb/v1/mlb_certificate.py,sha256=
|
|
182
|
+
eclcli/mlb/v1/mlb_certificate.py,sha256=lMokq-GBv32W5901NTCxUbz6ztVpMLpq70kffX47wAM,8564
|
|
183
183
|
eclcli/mlb/v1/mlb_health_monitor.py,sha256=rhs6zWn2yH3z_NXdUNRzEVUfLh7F5_ZKkTvvp4uLgnM,15610
|
|
184
184
|
eclcli/mlb/v1/mlb_listener.py,sha256=fOgI8sE8SLawPEbXyuzQg8qIt_CvuQ6k07tBJQIMriY,12341
|
|
185
185
|
eclcli/mlb/v1/mlb_load_balancer.py,sha256=Nk_d879EToPMynGabVF5wcTwDGaf2M6C4Z-zBhPDKmA,22793
|
|
@@ -323,8 +323,8 @@ eclcli/security_order/v3/ha_device.py,sha256=qGcLkQuzrya3HtbagoJ8IXc2kF5OOgdaTKI
|
|
|
323
323
|
eclcli/security_order/v3/host_based_security.py,sha256=LPkhuHh-nsCICaHjAkqweinrt4D9JEP7FF9xnjwyTlo,9691
|
|
324
324
|
eclcli/security_order/v3/waf.py,sha256=KesXZPpM_oEe5EI9aF-ZmnDf-9EhdnKn5dDDfkXNuH4,6303
|
|
325
325
|
eclcli/sss/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
326
|
-
eclcli/sss/client.py,sha256=
|
|
327
|
-
eclcli/sss/sssclient/__init__.py,sha256=
|
|
326
|
+
eclcli/sss/client.py,sha256=tIT_x--1DMnxIylv_2rqdeAfEs7-0Utn5GKf-3JLWZ4,742
|
|
327
|
+
eclcli/sss/sssclient/__init__.py,sha256=hi0uNMVrtjMkBKOMplVgOykvjDhZImsHFdwBjEAVoQc,131
|
|
328
328
|
eclcli/sss/sssclient/client.py,sha256=tjzc5PVKJZ9jQMRRh8SNGbIDRHP6oiWuxq7_kiKi9jg,14012
|
|
329
329
|
eclcli/sss/sssclient/i18n.py,sha256=Yoe-6VTRulHBT_pkOHrZKNKjcIphCDxeM6mA5mEtc24,284
|
|
330
330
|
eclcli/sss/sssclient/version.py,sha256=0Ro1MHhJsf6Hxcdm-kCBH5Ke1bTv-G5vGYEtTMdePSE,95
|
|
@@ -336,15 +336,15 @@ eclcli/sss/sssclient/common/exceptions.py,sha256=QA9uAu0x50Gx_Lp-PVHlF6Bbn0w9OtS
|
|
|
336
336
|
eclcli/sss/sssclient/common/serializer.py,sha256=_E6_gQA5pu9abgCK-Q2C-4XUKjfBkI6wNGleSkvWDgU,14084
|
|
337
337
|
eclcli/sss/sssclient/common/utils.py,sha256=Xcl54K7sbfPiFzPy3RbykwDLHrHvMiZDrMW1ctxOrnw,4600
|
|
338
338
|
eclcli/sss/sssclient/common/validators.py,sha256=rP140CMlpq21wSZH-yAIkshPb53QoTBAsfnaHal0lxc,1931
|
|
339
|
-
eclcli/sss/sssclient/
|
|
340
|
-
eclcli/sss/sssclient/
|
|
341
|
-
eclcli/sss/
|
|
342
|
-
eclcli/sss/
|
|
343
|
-
eclcli/sss/
|
|
344
|
-
eclcli/sss/
|
|
345
|
-
eclcli/sss/
|
|
346
|
-
eclcli/sss/
|
|
347
|
-
eclcli/sss/
|
|
339
|
+
eclcli/sss/sssclient/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
340
|
+
eclcli/sss/sssclient/v2/client.py,sha256=e7OIGPn9xmRkhWYNj0xurXqA3Zr35hHJaqFMZI3Jh4Y,21706
|
|
341
|
+
eclcli/sss/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
342
|
+
eclcli/sss/v2/api_keypair.py,sha256=QpwQ4SJbEd2xjzNG7g80VhHoXzeQCUU3eAsr3cSo_Rw,837
|
|
343
|
+
eclcli/sss/v2/channel.py,sha256=rdOj0Wo9e61e4Ipmnx2IDhdlfNEAZz9g5Togsir6e8E,1484
|
|
344
|
+
eclcli/sss/v2/contract.py,sha256=x8Dyn-FksgKgpEiT5QzkGhY0IIkEMfhw9FqPofB5AXA,5801
|
|
345
|
+
eclcli/sss/v2/tenant.py,sha256=iV2K_rJ11OwUNT1KmSKb-ULoefki0LLfr72z5qypC-I,2829
|
|
346
|
+
eclcli/sss/v2/user.py,sha256=11dIiv1l9gVuFokKStayXCeQLFujJr98AXFQXNRBJzA,4377
|
|
347
|
+
eclcli/sss/v2/workspace.py,sha256=pE_nbiw2gKeG7buthss8Mw2qUm8BwZUXqAiNrzNbs-Q,6319
|
|
348
348
|
eclcli/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
349
349
|
eclcli/storage/client.py,sha256=NAkme_gSS7DfoOwKzOTWGaZKZ9zUECjHrJkV4qa2ibo,975
|
|
350
350
|
eclcli/storage/storageclient/__init__.py,sha256=e5Xh756GvCbk0sPfWBD42Qpx9K1B-1hGPtZAY19QfE4,282
|
|
@@ -383,7 +383,7 @@ eclcli/vnf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
383
383
|
eclcli/vnf/client.py,sha256=ztw3FOyAXTjYdIPllExJQVRnon4DdSeuL-JXgdU8Ojg,520
|
|
384
384
|
eclcli/vnf/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
385
385
|
eclcli/vnf/v1/operation.py,sha256=cMhpQKmJuIPRfcRUa48e_31_VYCBVpCJ162cCSx3dFw,2735
|
|
386
|
-
eclcli/vnf/v1/virtual_network_appliance.py,sha256=
|
|
386
|
+
eclcli/vnf/v1/virtual_network_appliance.py,sha256=esrImeT5RJOspdaVuIfbCn9KBN5YGnbOKl5fEO1Os7U,33447
|
|
387
387
|
eclcli/vnf/v1/virtual_network_appliance_plan.py,sha256=MRGiul-oMTLEqaqm28wPKDaZC_Epx_k_HATIHdia9Tw,2229
|
|
388
388
|
eclcli/volume/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
389
389
|
eclcli/volume/client.py,sha256=cp4u7T2xMptA_ScQgzUIKZBC3ca-Ky-6DgiGC5JWc18,2476
|
|
@@ -393,11 +393,10 @@ eclcli/volume/v2/qos_specs.py,sha256=Iav_8gTYtKW70h_bmiG3RgN1wn9ijsIHHSSZF1QqN90
|
|
|
393
393
|
eclcli/volume/v2/snapshot.py,sha256=zyVcTz25U5Lofra4t_j7XnGCWdmFhENv7HL8slgM5zw,8474
|
|
394
394
|
eclcli/volume/v2/volume.py,sha256=84-zkIqC7W3kwQ1F8xIS1X8Y2_ODC1jgqfT4qxqE_zc,13520
|
|
395
395
|
eclcli/volume/v2/volume_type.py,sha256=ynqzu8EBciGHgWiJJVDAlkXvgbd_mx-0238wlekj0jk,7677
|
|
396
|
-
eclcli-4.
|
|
397
|
-
eclcli-4.
|
|
398
|
-
eclcli-4.
|
|
399
|
-
eclcli-4.
|
|
400
|
-
eclcli-4.
|
|
401
|
-
eclcli-4.
|
|
402
|
-
eclcli-4.
|
|
403
|
-
eclcli-4.1.0.dist-info/RECORD,,
|
|
396
|
+
eclcli-4.2.0.dev351.dist-info/AUTHORS,sha256=cdu7OD2OtjGsLiPcqLJn6AnhqPtneiI-NQCkH1sGb3w,2021
|
|
397
|
+
eclcli-4.2.0.dev351.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
|
|
398
|
+
eclcli-4.2.0.dev351.dist-info/METADATA,sha256=fI95Gg33SKrMtDiR7KQvZLP9VKiSVf54rtIfTRLe8R0,4575
|
|
399
|
+
eclcli-4.2.0.dev351.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
400
|
+
eclcli-4.2.0.dev351.dist-info/entry_points.txt,sha256=vTVMac07Iy3XrdHzSiyA_4EVjbPivj070sKzqRCi3bY,29843
|
|
401
|
+
eclcli-4.2.0.dev351.dist-info/top_level.txt,sha256=qlWRxE3Bx0n2jNA1dKFpeHMVsM-xGaM1rJ_TDutMlkA,7
|
|
402
|
+
eclcli-4.2.0.dev351.dist-info/RECORD,,
|
|
@@ -377,32 +377,35 @@ security_waf_list = eclcli.security_order.v3.waf:ListDevices
|
|
|
377
377
|
security_waf_show_status = eclcli.security_order.v3.waf:ShowStatus
|
|
378
378
|
security_waf_update = eclcli.security_order.v3.waf:UpdateDevice
|
|
379
379
|
|
|
380
|
-
[ecl.sss.
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
sss_iam_group_attach-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
sss_iam_group_detach-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
380
|
+
[ecl.sss.v2]
|
|
381
|
+
sss_contract_show = eclcli.sss.v2.contract:ShowContract
|
|
382
|
+
sss_iam_group_attach-role = eclcli.iam.v2.group:AttachRole
|
|
383
|
+
sss_iam_group_attach-user = eclcli.iam.v2.group:AttachUser
|
|
384
|
+
sss_iam_group_create = eclcli.iam.v2.group:CreateGroup
|
|
385
|
+
sss_iam_group_delete = eclcli.iam.v2.group:DeleteGroup
|
|
386
|
+
sss_iam_group_detach-role = eclcli.iam.v2.group:DetachRole
|
|
387
|
+
sss_iam_group_detach-user = eclcli.iam.v2.group:DetachUser
|
|
388
|
+
sss_iam_group_list = eclcli.iam.v2.group:ListGroup
|
|
389
|
+
sss_iam_role_create = eclcli.iam.v2.role:CreateRole
|
|
390
|
+
sss_iam_role_delete = eclcli.iam.v2.role:DeleteRole
|
|
391
|
+
sss_iam_role_list = eclcli.iam.v2.role:ListRole
|
|
392
|
+
sss_iam_role_show = eclcli.iam.v2.role:ShowRole
|
|
393
|
+
sss_iam_user_list = eclcli.iam.v2.user:ListUser
|
|
394
|
+
sss_tenant_create = eclcli.sss.v2.tenant:CreateTenant
|
|
395
|
+
sss_tenant_list = eclcli.sss.v2.tenant:ListTenant
|
|
396
|
+
sss_tenant_show = eclcli.sss.v2.tenant:ShowTenant
|
|
397
|
+
sss_update-api-keypair = eclcli.sss.v2.api_keypair:SetAPIKeypair
|
|
398
|
+
sss_user_create = eclcli.sss.v2.user:CreateUser
|
|
399
|
+
sss_user_delete = eclcli.sss.v2.user:DeleteUser
|
|
400
|
+
sss_user_list = eclcli.sss.v2.user:ListUser
|
|
401
|
+
sss_user_show = eclcli.sss.v2.user:ShowUser
|
|
402
|
+
sss_workspace-role-assignment_add = eclcli.sss.v2.workspace:AddWorkspaceRoleAssignment
|
|
403
|
+
sss_workspace-role-assignment_delete = eclcli.sss.v2.workspace:DeleteWorkspaceRoleAssignment
|
|
404
|
+
sss_workspace_create = eclcli.sss.v2.workspace:CreateWorkspace
|
|
405
|
+
sss_workspace_delete = eclcli.sss.v2.workspace:DeleteWorkspace
|
|
406
|
+
sss_workspace_list = eclcli.sss.v2.workspace:ListWorkspace
|
|
407
|
+
sss_workspace_show = eclcli.sss.v2.workspace:ShowWorkspace
|
|
408
|
+
sss_workspace_update = eclcli.sss.v2.workspace:SetWorkspace
|
|
406
409
|
|
|
407
410
|
[ecl.storage.v2]
|
|
408
411
|
storage_availability-zone_list = eclcli.storage.v2.availability_zone:ListAvailabilityZone
|
eclcli/sss/v1/role.py
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
from eclcli.common import command
|
|
4
|
-
from eclcli.common import exceptions
|
|
5
|
-
from eclcli.common import utils
|
|
6
|
-
from eclcli.i18n import _ # noqa
|
|
7
|
-
from eclcli.identity import common as identity_common
|
|
8
|
-
from ..sssclient.common.utils import objectify
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class CreateRole(command.ShowOne):
|
|
12
|
-
_description = _("Create new role")
|
|
13
|
-
def get_parser(self, prog_name):
|
|
14
|
-
parser = super(CreateRole, self).get_parser(prog_name)
|
|
15
|
-
parser.add_argument(
|
|
16
|
-
'tenant_id',
|
|
17
|
-
metavar='<tenant_id>',
|
|
18
|
-
help='Tenant which the user have role.',
|
|
19
|
-
)
|
|
20
|
-
parser.add_argument(
|
|
21
|
-
'user_id',
|
|
22
|
-
metavar='<user_id>',
|
|
23
|
-
help='User which have new role.',
|
|
24
|
-
)
|
|
25
|
-
return parser
|
|
26
|
-
|
|
27
|
-
def take_action(self, parsed_args):
|
|
28
|
-
sss_client = self.app.client_manager.sss
|
|
29
|
-
body = {}
|
|
30
|
-
if parsed_args.user_id is not None:
|
|
31
|
-
body['user_id'] = str(parsed_args.user_id)
|
|
32
|
-
if parsed_args.tenant_id is not None:
|
|
33
|
-
body['tenant_id'] = str(parsed_args.tenant_id)
|
|
34
|
-
|
|
35
|
-
role = sss_client.create_role(body)
|
|
36
|
-
columns = utils.get_columns(role)
|
|
37
|
-
obj = objectify(role)
|
|
38
|
-
data = utils.get_item_properties(obj, columns)
|
|
39
|
-
return columns, data
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class DeleteRole(command.Command):
|
|
43
|
-
_description = _("Delete role")
|
|
44
|
-
def get_parser(self, prog_name):
|
|
45
|
-
parser = super(DeleteRole, self).get_parser(prog_name)
|
|
46
|
-
parser.add_argument(
|
|
47
|
-
'tenant_id',
|
|
48
|
-
metavar='<tenant_id>',
|
|
49
|
-
help='Delete target tenant\'s tenant id.',
|
|
50
|
-
)
|
|
51
|
-
parser.add_argument(
|
|
52
|
-
'user_id',
|
|
53
|
-
metavar='<user_id>',
|
|
54
|
-
help='User\'s id of the role.',
|
|
55
|
-
)
|
|
56
|
-
return parser
|
|
57
|
-
|
|
58
|
-
def take_action(self, parsed_args):
|
|
59
|
-
sss_client = self.app.client_manager.sss
|
|
60
|
-
tenant_id = parsed_args.tenant_id
|
|
61
|
-
user_id = parsed_args.user_id
|
|
62
|
-
sss_client.delete_role(tenant_id, user_id)
|
|
63
|
-
|
eclcli-4.1.0.dist-info/pbr.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "a7a10fc", "is_release": true}
|
|
File without changes
|
/eclcli/iam/{v1 → v2}/group.py
RENAMED
|
File without changes
|
/eclcli/iam/{v1 → v2}/role.py
RENAMED
|
File without changes
|
/eclcli/iam/{v1 → v2}/user.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/eclcli/sss/{v1 → v2}/channel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|