ModelClient.add_cloud_interactive()'s vsphere block could expect
"Enter the vCenter address or URL:|Enter the API endpoint url for the cloud:"
and
"Enter region name:|Enter datacenter name:"
and other prompts
...
if cloud['type'] == 'vsphere': child.expect('Enter the API endpoint url for the cloud:') child.sendline(cloud['endpoint'])
for num, (name, values) in enumerate(cloud['regions'].items()): child.expect("(Enter region name:)|" "(Can't validate endpoint)") if child.match.group(2) is not None: raise InvalidEndpoint() child.sendline(name) child.expect('Enter another region\? \(Y/n\):') if num + 1 < len(cloud['regions']): child.sendline('y') else: child.sendline('n')
ModelClient. add_cloud_ interactive( )'s vsphere block could expect
child. expect( 'Enter the API endpoint url for the cloud:')
child. sendline( cloud[' endpoint' ]) cloud[' regions' ].items( )):
child. expect( "(Enter region name:)|"
"( Can't validate endpoint)")
if child.match. group(2) is not None:
raise InvalidEndpoint()
child. sendline( name)
child. expect( 'Enter another region\? \(Y/n\):')
if num + 1 < len(cloud[ 'regions' ]):
child. sendline( 'y')
else:
child. sendline( 'n')
"Enter the vCenter address or URL:|Enter the API endpoint url for the cloud:"
and
"Enter region name:|Enter datacenter name:"
and other prompts
...
if cloud['type'] == 'vsphere':
for num, (name, values) in enumerate(