"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/cloud/clouds/gogrid.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

gogrid.py  (salt-2019.2.0):gogrid.py  (salt-2019.2.1)
skipping to change at line 111 skipping to change at line 111
if len(vm_['name']) > 20: if len(vm_['name']) > 20:
raise SaltCloudException('VM names must not be longer than 20 characters ') raise SaltCloudException('VM names must not be longer than 20 characters ')
log.info('Creating Cloud VM %s', vm_['name']) log.info('Creating Cloud VM %s', vm_['name'])
image_id = avail_images()[vm_['image']]['id'] image_id = avail_images()[vm_['image']]['id']
if 'assign_public_ip' in vm_: if 'assign_public_ip' in vm_:
host_ip = vm_['assign_public_ip'] host_ip = vm_['assign_public_ip']
else: else:
public_ips = list_public_ips() public_ips = list_public_ips()
if len(public_ips.keys()) < 1: if not public_ips:
raise SaltCloudException('No more IPs available') raise SaltCloudException('No more IPs available')
host_ip = list(public_ips)[0] host_ip = next(iter(public_ips))
create_kwargs = { create_kwargs = {
'name': vm_['name'], 'name': vm_['name'],
'image': image_id, 'image': image_id,
'ram': vm_['size'], 'ram': vm_['size'],
'ip': host_ip, 'ip': host_ip,
} }
__utils__['cloud.fire_event']( __utils__['cloud.fire_event'](
'event', 'event',
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)