with_output=FlagArgument('show response headers', ('--with-output')),
json_output=FlagArgument(
'show headers in json (DEPRECATED from v0.12,'
- ' please use --output-format=json instead)', ('-j', '--json'))
+ ' please use --output-format=json instead)', ('-j', '--json'))
)
def _optional_output(self, r):
"end_date": date,
"join_policy": "auto" | "moderated" | "closed", # default: "moderated"
"leave_policy": "auto" | "moderated" | "closed", # default: "auto"
- "resources": {
- "cyclades.vm": {
- "project_capacity": int or null,
- "member_capacity": int
- }
- }
- }
+ "resources": {"cyclades.vm": {
+ "project_capacity": int or null,
+ "member_capacity": int
+ }}}
+
"""
@command(project_commands)
class project_create(_init_synnefo_astakosclient, _optional_json):
"""Apply for a new project (enter data though standard input or file path)
+
Project details must be provided as a json-formated dict from the
standard input, or through a file
"""
-
__doc__ += _project_specs
arguments = dict(
:param networks: (list of dicts) Networks to connect to, list this:
"networks": [
- {"uuid": <network_uuid>},
- {"uuid": <network_uuid>, "fixed_ip": address},
- {"port": <port_id>}, ...]
+ {"uuid": <network_uuid>},
+ {"uuid": <network_uuid>, "fixed_ip": address},
+ {"port": <port_id>}, ...]
ATTENTION: Empty list is different to None. None means ' do not
mention it', empty list means 'automatically get an ip'
def create_networks(self, networks):
"""Atomic operation for batch network creation (all or nothing)
+
:param networks: (list) [
{name: ..(str).., admin_state_up: ..(bool).., shared: ..(bool)..},
{name: ..(str).., admin_state_up: ..(bool).., shared: ..(bool)..}]
name is mandatory, the rest is optional
e.g., create_networks([
- {name: 'net1', admin_state_up: True},
- {name: 'net2'}])
+ {name: 'net1', admin_state_up: True},
+ {name: 'net2'}])
:returns: (list of dicts) created networks details
:raises ValueError: if networks is misformated
:raises ClientError: if the request failed or didn't return 201
def create_subnets(self, subnets):
"""Atomic operation for batch subnet creation (all or nothing)
+
:param subnets: (list of dicts) {key: ...} with all parameters in the
method create_subnet, where method mandatory / optional paramteres
respond to mandatory / optional paramters in subnets items
def create_ports(self, ports):
"""Atomic operation for batch port creation (all or nothing)
+
:param ports: (list of dicts) {key: ...} with all parameters in the
method create_port, where method mandatory / optional paramteres
respond to mandatory / optional paramters in ports items