Ensure the project for volumes are handled properly.
[snaps.git] / snaps / openstack / utils / launch_utils.py
index e10cf48..1899ef6 100644 (file)
@@ -118,7 +118,7 @@ def launch_config(config, tmplt_file, deploy, clean, clean_image):
             users_dict)
         creators.append(vol_type_dict)
 
-        # Create volume types
+        # Create volumes
         vol_dict = __create_instances(
             os_creds_dict, OpenStackVolume, VolumeConfig,
             os_config.get('volumes'), 'volume', clean, users_dict)
@@ -462,7 +462,7 @@ def __apply_ansible_playbook(ansible_config, os_creds, vm_dict, image_dict,
 
             retval = ansible_utils.apply_playbook(
                 ansible_config['playbook_location'], floating_ips, remote_user,
-                private_key_filepath,
+                ssh_priv_key_file_path=private_key_filepath,
                 variables=variables,
                 proxy_setting=proxy_settings)
             if retval != 0:
@@ -675,6 +675,12 @@ def __get_network_variable_value(var_config_values, networks_dict):
                                 return subnet.gateway_ip
                             if 'ip_range' == var_config_values['value']:
                                 return subnet.start + ' ' + subnet.end
+                            if 'ip_range_start' == var_config_values['value']:
+                                return subnet.start
+                            if 'ip_range_end' == var_config_values['value']:
+                                return subnet.end
+                            if 'cidr' == var_config_values['value']:
+                                return subnet.cidr
                             if 'cidr_ip' == var_config_values['value']:
                                 cidr_split = subnet.cidr.split('/')
                                 return cidr_split[0]