Change default pool name for disk provisioning to empty string

rc-2.0
Sergey Shubin svs1370 4 years ago
parent e17c8be53a
commit bc317d1438

@ -139,7 +139,7 @@ options:
description:
- Name of the pool where to place new disk. Once disk is created, its pool cannot be changed.
- This parameter is used when creating new disk and igonred for all other operations.
default: default
default: empty string
required: no
sep_id:
description:
@ -209,7 +209,6 @@ EXAMPLES = '''
controller_url: "https://cloud.digitalenergy.online"
name: "MyDataDisk01"
sep_id: 1
pool: "default"
size: 50
account_name: "MyAccount"
state: present
@ -316,7 +315,7 @@ def decort_disk_parameters():
fallback=(env_fallback, ['DECORT_PASSWORD']),
no_log=True),
place_with=dict(type='int', required=False, default=0),
pool=dict(type='str', required=False, default='default'),
pool=dict(type='str', required=False, default=''),
sep_id=dict(type='int', required=False, default=0),
size=dict(type='int', required=False),
state=dict(type='str',
@ -402,7 +401,7 @@ def main():
disk_should_exist = False
target_sep_id = 0
target_pool = "default"
# target_pool = ""
if disk_id:
disk_should_exist = True

@ -2323,7 +2323,7 @@ class DecortController(object):
return 0, None
def disk_provision(self, disk_name, size, account_id, sep_id, pool="default", desc="", location=""):
def disk_provision(self, disk_name, size, account_id, sep_id, pool_name="", desc="", location=""):
"""Provision Disk according to the specified arguments.
Note that disks created by this method will be of type 'D' (data disks).
If critical error occurs the embedded call to API function will abort further execution
@ -2361,8 +2361,9 @@ class DecortController(object):
description=desc,
size=size,
type='D',
sep_id=sep_id,
pool=pool,)
sep_id=sep_id,)
if pool_name != "":
api_params['pool'] = pool_name
api_resp = self.decort_api_call(requests.post, "/restmachine/cloudapi/disks/create", api_params)
if api_resp.status_code == 200:
ret_disk_id = json.loads(api_resp.content.decode('utf8'))

Loading…
Cancel
Save