diff --git a/IM/InfrastructureManager.py b/IM/InfrastructureManager.py index 11fbc3ea7..81e04787b 100644 --- a/IM/InfrastructureManager.py +++ b/IM/InfrastructureManager.py @@ -242,14 +242,14 @@ def get_infrastructure(inf_id, auth): """Return infrastructure info with some id if valid authorization provided.""" if inf_id not in IM.InfrastructureList.InfrastructureList.get_inf_ids(): - InfrastructureManager.logger.error("Error, incorrect infrastructure ID: %s" % inf_id) + InfrastructureManager.logger.error("Error, incorrect Inf ID: %s" % inf_id) raise IncorrectInfrastructureException() sel_inf = IM.InfrastructureList.InfrastructureList.get_infrastructure(inf_id) if not sel_inf.is_authorized(auth): - InfrastructureManager.logger.error("Access Error to infrastructure ID: %s" % inf_id) + InfrastructureManager.logger.error("Access Error to Inf ID: %s" % inf_id) raise UnauthorizedUserException() if sel_inf.deleted: - InfrastructureManager.logger.error("Infrastructure ID: %s is deleted." % inf_id) + InfrastructureManager.logger.error("Inf ID: %s is deleted." % inf_id) raise DeletedInfrastructureException() return sel_inf @@ -276,12 +276,12 @@ def Reconfigure(inf_id, radl_data, auth, vm_list=None): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info("Reconfiguring the inf: " + str(inf_id)) + InfrastructureManager.logger.info("Reconfiguring the Inf ID: " + str(inf_id)) if isinstance(radl_data, RADL): radl = radl_data else: radl = radl_parse.parse_radl(radl_data) - InfrastructureManager.logger.debug(radl) + InfrastructureManager.logger.debug("Inf ID: " + str(inf_id) + ": \n" + str(radl)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) @@ -311,7 +311,7 @@ def Reconfigure(inf_id, radl_data, auth, vm_list=None): password=password, public_key=public_key, private_key=private_key, new=True) # Stick all virtual machines to be reconfigured - InfrastructureManager.logger.info("Contextualize the inf: " + sel_inf.id) + InfrastructureManager.logger.info("Contextualize the Inf ID: " + sel_inf.id) # reset ansible_configured to force the re-installation of galaxy roles sel_inf.ansible_configured = None sel_inf.Contextualize(auth, vm_list) @@ -383,14 +383,14 @@ def AddResource(inf_id, radl_data, auth, context=True, failed_clouds=None): failed_clouds = [] auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info("Adding resources to inf: " + str(inf_id)) + InfrastructureManager.logger.info("Adding resources to Inf ID: " + str(inf_id)) if isinstance(radl_data, RADL): radl = radl_data else: radl = radl_parse.parse_radl(radl_data) - InfrastructureManager.logger.debug(radl) + InfrastructureManager.logger.debug("Inf ID: " + str(inf_id) + ": \n" + str(radl)) radl.check() sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) @@ -423,7 +423,7 @@ def AddResource(inf_id, radl_data, auth, context=True, failed_clouds=None): "Error in the requirements of the app: " + app_to_install.getValue("name") + ". Ignore them.") - InfrastructureManager.logger.debug(requirements) + InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + ": " + str(requirements)) break # Get VMRC credentials @@ -493,7 +493,7 @@ def AddResource(inf_id, radl_data, auth, context=True, failed_clouds=None): # Group virtual machines to deploy by network dependencies deploy_groups = InfrastructureManager._compute_deploy_groups(radl) InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + ": Groups of VMs with dependencies") - InfrastructureManager.logger.debug(deploy_groups) + InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + "\n" + str(deploy_groups)) # Sort by score the cloud providers # NOTE: consider fake deploys (vm_number == 0) @@ -511,7 +511,7 @@ def AddResource(inf_id, radl_data, auth, context=True, failed_clouds=None): elif len(suggested_cloud_ids) == 1: if suggested_cloud_ids[0] not in cloud_list: InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + ": Cloud Provider list:") - InfrastructureManager.logger.debug(cloud_list) + InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + " - " + str(cloud_list)) raise Exception("No auth data for cloud with ID: %s" % suggested_cloud_ids[0]) else: cloud_list0 = [ @@ -597,7 +597,7 @@ def AddResource(inf_id, radl_data, auth, context=True, failed_clouds=None): # Add the new virtual machines to the infrastructure sel_inf.update_radl(radl, [(d, deployed_vm[d], concrete_systems[d.cloud_id][d.id][0]) for d in deployed_vm]) - InfrastructureManager.logger.info("VMs %s successfully added to Inf id %s" % (new_vms, sel_inf.id)) + InfrastructureManager.logger.info("VMs %s successfully added to Inf ID: %s" % (new_vms, sel_inf.id)) # Let's contextualize! if context and new_vms: @@ -623,7 +623,7 @@ def RemoveResource(inf_id, vm_list, auth, context=True): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info("Removing the VMs: " + str(vm_list) + " from inf ID: '" + str(inf_id) + "'") + InfrastructureManager.logger.info("Removing the VMs: " + str(vm_list) + " from Inf ID: '" + str(inf_id) + "'") sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) @@ -698,7 +698,7 @@ def GetVMInfo(inf_id, vm_id, auth, json_res=False): auth = InfrastructureManager.check_auth_data(auth) InfrastructureManager.logger.info( - "Get information about the vm: '" + str(vm_id) + "' from inf: " + str(inf_id)) + "Get information about the vm: '" + str(vm_id) + "' from Inf ID: " + str(inf_id)) vm = InfrastructureManager.get_vm_from_inf(inf_id, vm_id, auth) @@ -729,12 +729,12 @@ def GetVMContMsg(inf_id, vm_id, auth): auth = InfrastructureManager.check_auth_data(auth) InfrastructureManager.logger.info( - "Get contextualization log of the vm: '" + str(vm_id) + "' from inf: " + str(inf_id)) + "Get contextualization log of the vm: '" + str(vm_id) + "' from Inf ID: " + str(inf_id)) vm = InfrastructureManager.get_vm_from_inf(inf_id, vm_id, auth) cont_msg = vm.get_cont_msg() - InfrastructureManager.logger.debug(cont_msg) + InfrastructureManager.logger.debug("Inf ID: " + str(inf_id) + ": " + cont_msg) return cont_msg @@ -755,7 +755,7 @@ def AlterVM(inf_id, vm_id, radl_data, auth): auth = InfrastructureManager.check_auth_data(auth) InfrastructureManager.logger.info( - "Modifying the VM: '" + str(vm_id) + "' from inf: " + str(inf_id)) + "Modifying the VM: '" + str(vm_id) + "' from Inf ID: " + str(inf_id)) vm = InfrastructureManager.get_vm_from_inf(inf_id, vm_id, auth) if not vm: InfrastructureManager.logger.info( @@ -800,12 +800,12 @@ def GetInfrastructureRADL(inf_id, auth): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info("Getting RADL of the inf: " + str(inf_id)) + InfrastructureManager.logger.info("Getting RADL of the Inf ID: " + str(inf_id)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) radl = str(sel_inf.get_radl()) - InfrastructureManager.logger.debug(radl) + InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + ": " + radl) return radl @staticmethod @@ -822,12 +822,12 @@ def GetInfrastructureInfo(inf_id, auth): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info("Getting information about the inf: " + str(inf_id)) + InfrastructureManager.logger.info("Getting information about the Inf ID: " + str(inf_id)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) res = [str(vm.im_id) for vm in sel_inf.get_vm_list()] - InfrastructureManager.logger.debug(res) + InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + ": " + str(res)) return res @staticmethod @@ -846,7 +846,7 @@ def GetInfrastructureContMsg(inf_id, auth, headeronly=False): auth = InfrastructureManager.check_auth_data(auth) InfrastructureManager.logger.info( - "Getting cont msg of the inf: " + str(inf_id)) + "Getting cont msg of the Inf ID: " + str(inf_id)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) res = sel_inf.cont_out @@ -857,7 +857,7 @@ def GetInfrastructureContMsg(inf_id, auth, headeronly=False): res += "VM " + str(vm.id) + ":\n" + vm.get_cont_msg() + "\n" res += "***************************************************************************\n" - InfrastructureManager.logger.debug(res) + InfrastructureManager.logger.debug("Inf ID: " + sel_inf.id + ": " + res) return res @staticmethod @@ -876,8 +876,7 @@ def GetInfrastructureState(inf_id, auth): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info( - "Getting state of the inf: " + str(inf_id)) + InfrastructureManager.logger.info("Getting state of the Inf ID: " + str(inf_id)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) @@ -917,20 +916,19 @@ def GetInfrastructureState(inf_id, auth): if state is None: state = VirtualMachine.UNKNOWN - InfrastructureManager.logger.info( - "inf: " + str(inf_id) + " is in state: " + state) + InfrastructureManager.logger.info("Inf ID: " + str(inf_id) + " is in state: " + state) return {'state': state, 'vm_states': vm_states} @staticmethod def _stop_vm(vm, auth, exceptions): try: success = False - InfrastructureManager.logger.info("Stopping the VM id: " + vm.id) + InfrastructureManager.logger.info("Inf ID: " + vm.inf.id + ": Stopping the VM id: " + vm.id) (success, msg) = vm.stop(auth) except Exception as e: msg = str(e) if not success: - InfrastructureManager.logger.info("The VM cannot be stopped") + InfrastructureManager.logger.info("Inf ID: " + vm.inf.id + ": The VM cannot be stopped") exceptions.append(msg) @staticmethod @@ -947,8 +945,7 @@ def StopInfrastructure(inf_id, auth): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info( - "Stopping the infrastructure id: " + str(inf_id)) + InfrastructureManager.logger.info("Stopping the Inf ID: " + str(inf_id)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) exceptions = [] @@ -977,12 +974,12 @@ def StopInfrastructure(inf_id, auth): def _start_vm(vm, auth, exceptions): try: success = False - InfrastructureManager.logger.info("Starting the VM id: " + vm.id) + InfrastructureManager.logger.info("Inf ID: " + vm.inf.id + ": Starting the VM id: " + vm.id) (success, msg) = vm.start(auth) except Exception as e: msg = str(e) if not success: - InfrastructureManager.logger.info("The VM cannot be restarted") + InfrastructureManager.logger.info("Inf ID: " + vm.inf.id + ": The VM cannot be restarted") exceptions.append(msg) @staticmethod @@ -999,8 +996,7 @@ def StartInfrastructure(inf_id, auth): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info( - "Starting the infrastructure id: " + str(inf_id)) + InfrastructureManager.logger.info("Starting the Inf ID: " + str(inf_id)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) exceptions = [] @@ -1040,8 +1036,7 @@ def StartVM(inf_id, vm_id, auth): """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info( - "Starting the VM id %s from the infrastructure id: %s" % (vm_id, inf_id)) + InfrastructureManager.logger.info("Starting the VM id %s from the Inf ID: %s" % (vm_id, inf_id)) vm = InfrastructureManager.get_vm_from_inf(inf_id, vm_id, auth) success = False @@ -1078,7 +1073,7 @@ def StopVM(inf_id, vm_id, auth): auth = InfrastructureManager.check_auth_data(auth) InfrastructureManager.logger.info( - "Stopping the VM id %s from the infrastructure id: %s" % (vm_id, inf_id)) + "Stopping the VM id %s from the Inf ID: %s" % (vm_id, inf_id)) vm = InfrastructureManager.get_vm_from_inf(inf_id, vm_id, auth) success = False @@ -1125,12 +1120,12 @@ def _delete_vm(vm, delete_list, auth, exceptions): last = InfrastructureManager.is_last_in_cloud(vm, delete_list, remain_vms) success = False try: - InfrastructureManager.logger.info("Finalizing the VM id: " + str(vm.id)) + InfrastructureManager.logger.info("Inf ID: " + vm.inf.id + ": Finalizing the VM id: " + str(vm.id)) (success, msg) = vm.finalize(last, auth) except Exception as e: msg = str(e) if not success: - InfrastructureManager.logger.info("The VM cannot be finalized: %s" % msg) + InfrastructureManager.logger.info("Inf ID: " + vm.inf.id + ": The VM cannot be finalized: %s" % msg) exceptions.append(msg) return success @@ -1149,7 +1144,7 @@ def DestroyInfrastructure(inf_id, auth): # First check the auth data auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info("Destroying the infrastructure id: " + str(inf_id)) + InfrastructureManager.logger.info("Destroying the Inf ID: " + str(inf_id)) sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) exceptions = [] @@ -1178,7 +1173,7 @@ def DestroyInfrastructure(inf_id, auth): sel_inf.delete() IM.InfrastructureList.InfrastructureList.save_data(inf_id) IM.InfrastructureList.InfrastructureList.remove_inf(sel_inf) - InfrastructureManager.logger.info("Infrastructure %s successfully destroyed" % inf_id) + InfrastructureManager.logger.info("Inf ID: %s: Successfully destroyed" % inf_id) return "" @staticmethod @@ -1202,12 +1197,10 @@ def check_im_user(auth): break return found except Exception: - InfrastructureManager.logger.exception( - "Incorrect format in the User DB file %s" % Config.USER_DB) + InfrastructureManager.logger.exception("Incorrect format in the User DB file %s" % Config.USER_DB) return False else: - InfrastructureManager.logger.error( - "User DB file %s not found" % Config.USER_DB) + InfrastructureManager.logger.error("User DB file %s not found" % Config.USER_DB) return False else: return True @@ -1339,21 +1332,18 @@ def CreateInfrastructure(radl, auth): inf.auth = Authentication(auth.getAuthInfo("InfrastructureManager")) IM.InfrastructureList.InfrastructureList.add_infrastructure(inf) IM.InfrastructureList.InfrastructureList.save_data(inf.id) - InfrastructureManager.logger.info( - "Creating new infrastructure with id: " + str(inf.id)) + InfrastructureManager.logger.info("Creating new Inf ID: " + str(inf.id)) # Add the resources in radl_data try: InfrastructureManager.AddResource(inf.id, radl, auth) except Exception as e: - InfrastructureManager.logger.exception( - "Error Creating Inf id " + str(inf.id)) + InfrastructureManager.logger.exception("Error Creating Inf ID " + str(inf.id)) inf.delete() IM.InfrastructureList.InfrastructureList.save_data(inf.id) IM.InfrastructureList.InfrastructureList.remove_inf(inf) raise e - InfrastructureManager.logger.info( - "Infrastructure id " + str(inf.id) + " successfully created") + InfrastructureManager.logger.info("Inf ID:" + str(inf.id) + ": Successfully created") return inf.id @@ -1374,8 +1364,7 @@ def GetInfrastructureList(auth): auths = auth.getAuthInfo('InfrastructureManager') if not auths: - InfrastructureManager.logger.error( - "No correct auth data has been specified.") + InfrastructureManager.logger.error("No correct auth data has been specified.") raise InvaliddUserException() return IM.InfrastructureList.InfrastructureList.get_inf_ids(auth) @@ -1387,7 +1376,7 @@ def ExportInfrastructure(inf_id, delete, auth_data): sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth) str_inf = sel_inf.serialize() - InfrastructureManager.logger.info("Exporting infrastructure id: " + str(sel_inf.id)) + InfrastructureManager.logger.info("Exporting Inf ID: " + str(sel_inf.id)) if delete: sel_inf.delete() IM.InfrastructureList.InfrastructureList.save_data(sel_inf.id) @@ -1408,8 +1397,7 @@ def ImportInfrastructure(str_inf, auth_data): new_inf.auth = Authentication(auth.getAuthInfo("InfrastructureManager")) IM.InfrastructureList.InfrastructureList.add_infrastructure(new_inf) - InfrastructureManager.logger.info( - "Importing new infrastructure with id: " + str(new_inf.id)) + InfrastructureManager.logger.info("Importing new infrastructure with Inf ID: " + str(new_inf.id)) # Save the state IM.InfrastructureList.InfrastructureList.save_data(new_inf.id) return new_inf.id @@ -1433,13 +1421,14 @@ def CreateDiskSnapshot(inf_id, vm_id, disk_num, image_name, auto_delete, auth): Return: a str with url of the saved snapshot. """ auth = InfrastructureManager.check_auth_data(auth) - InfrastructureManager.logger.info("Creating a snapshot of VM id: %s Inf id: %s" % (vm_id, inf_id)) + InfrastructureManager.logger.info("Creating a snapshot of VM id: %s Inf ID: %s" % (vm_id, inf_id)) vm = InfrastructureManager.get_vm_from_inf(inf_id, vm_id, auth) success, image_url = vm.create_snapshot(disk_num, image_name, auto_delete, auth) if not success: - InfrastructureManager.logger.error("Error creating snapshot: %s" % image_url) + InfrastructureManager.logger.error("Error creating a snapshot: %s of VM id: %s " + "Inf ID: %s" % (image_url, vm_id, inf_id)) raise Exception("Error creating snapshot: %s" % image_url) else: return image_url diff --git a/IM/__init__.py b/IM/__init__.py index b51df70cc..e27452c8d 100644 --- a/IM/__init__.py +++ b/IM/__init__.py @@ -19,5 +19,5 @@ 'InfrastructureInfo', 'InfrastructureManager', 'recipe', 'request', 'REST', 'retry', 'ServiceRequests', 'SSH', 'SSHRetry', 'timedcall', 'UnixHTTPAdapter', 'uriparse', 'VirtualMachine', 'VMRC', 'xmlobject'] -__version__ = '1.6.4' +__version__ = '1.6.5' __author__ = 'Miguel Caballer' diff --git a/IM/ansible_utils/ansible_launcher.py b/IM/ansible_utils/ansible_launcher.py index 8ed588141..6981a4a90 100755 --- a/IM/ansible_utils/ansible_launcher.py +++ b/IM/ansible_utils/ansible_launcher.py @@ -157,6 +157,7 @@ def get_play_prereqs_2(self, options): variable_manager = VariableManager() variable_manager.extra_vars = self.extra_vars + variable_manager.options_vars = {'ansible_version': self.version_info(ansible_version)} # Add this to avoid the Ansible bug: no host vars as host is not in inventory # In version 2.0.1 it must be fixed @@ -186,9 +187,30 @@ def get_play_prereqs_2_4(self, options): # the code, ensuring a consistent view of global variables variable_manager = VariableManager(loader=loader, inventory=inventory) variable_manager.extra_vars = self.extra_vars + variable_manager.options_vars = {'ansible_version': self.version_info(ansible_version)} return loader, inventory, variable_manager + def version_info(self, ansible_version_string): + ''' return full ansible version info ''' + ansible_ver = ansible_version_string.split()[0] + ansible_versions = ansible_ver.split('.') + for counter in range(len(ansible_versions)): + if ansible_versions[counter] == "": + ansible_versions[counter] = 0 + try: + ansible_versions[counter] = int(ansible_versions[counter]) + except: + pass + if len(ansible_versions) < 3: + for counter in range(len(ansible_versions), 3): + ansible_versions.append(0) + return {'string': ansible_version_string.strip(), + 'full': ansible_ver, + 'major': ansible_versions[0], + 'minor': ansible_versions[1], + 'revision': ansible_versions[2]} + def launch_playbook_v2(self): ''' run ansible-playbook operations v2.X''' # create parser for CLI options diff --git a/IM/connectors/Azure.py b/IM/connectors/Azure.py index 32be3f6a9..2aaa87e90 100644 --- a/IM/connectors/Azure.py +++ b/IM/connectors/Azure.py @@ -148,20 +148,18 @@ def get_instance_type(self, system, credentials, subscription_id): instace_types = list(compute_client.virtual_machine_sizes.list(location)) instace_types.sort(key=lambda x: (x.number_of_cores, x.memory_in_mb, x.resource_disk_size_in_mb)) - res = None default = None for instace_type in instace_types: if instace_type.name == self.INSTANCE_TYPE: default = instace_type - # get the instance type with the lowest Memory - if res is None: - str_compare = "instace_type.number_of_cores " + cpu_op + " cpu " - str_compare += " and instace_type.memory_in_mb " + memory_op + " memory " - str_compare += " and instace_type.resource_disk_size_in_mb " + disk_free_op + " disk_free" - - if eval(str_compare): - if not instance_type_name or instace_type.name == instance_type_name: - return instace_type + + str_compare = "instace_type.number_of_cores " + cpu_op + " cpu " + str_compare += " and instace_type.memory_in_mb " + memory_op + " memory " + str_compare += " and instace_type.resource_disk_size_in_mb " + disk_free_op + " disk_free" + + if eval(str_compare): + if not instance_type_name or instace_type.name == instance_type_name: + return instace_type return default diff --git a/IM/connectors/OCCI.py b/IM/connectors/OCCI.py index c6891edec..de23f76fd 100644 --- a/IM/connectors/OCCI.py +++ b/IM/connectors/OCCI.py @@ -270,7 +270,7 @@ def manage_public_ips(self, vm, auth_data): self.MAX_ADD_IP_COUNT) else: self.log_error("Error adding public IP the VM: Max number of retries reached.") - self.error_messages += "Error adding public IP the VM: Max number of retries reached.\n" + # self.error_messages += "Error adding public IP the VM: Max number of retries reached.\n" # this is a total fail, stop contextualization vm.configured = False vm.inf.set_configured(False) diff --git a/IM/connectors/OpenStack.py b/IM/connectors/OpenStack.py index 305ca7785..5afbb82bd 100644 --- a/IM/connectors/OpenStack.py +++ b/IM/connectors/OpenStack.py @@ -175,22 +175,18 @@ def get_instance_type(self, sizes, radl): disk_free = radl.getFeature('disk.0.free_size').getValue('G') disk_free_op = radl.getFeature('memory.size').getLogOperator() - res = None + # get the node size with the lowest price, vcpus and memory + sizes.sort(key=lambda x: (x.price, x.vcpus, x.ram)) for size in sizes: - # get the node size with the lowest price and memory (in the case - # of the price is not set) - if res is None or (size.price <= res.price and size.ram <= res.ram): - str_compare = "size.ram " + memory_op + " memory" - str_compare += " and size.vcpus " + cpu_op + " cpu " - str_compare += " and size.disk " + disk_free_op + " disk_free" - if eval(str_compare): - if not instance_type_name or size.name == instance_type_name: - res = size - - if res is None: - self.log_error("No compatible size found") - - return res + str_compare = "size.ram " + memory_op + " memory" + str_compare += " and size.vcpus " + cpu_op + " cpu " + str_compare += " and size.disk " + disk_free_op + " disk_free" + if eval(str_compare): + if not instance_type_name or size.name == instance_type_name: + return size + + self.log_error("No compatible size found") + return None def concreteSystem(self, radl_system, auth_data): image_urls = radl_system.getValue("disk.0.image.url") diff --git a/README.md b/README.md index c68df44ca..b9ecba1f9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ ============================ * Version ![PyPI](https://img.shields.io/pypi/v/im.svg) -* PyPI ![PypI](https://img.shields.io/pypi/dm/IM.svg) * Build Status [![Build Status](http://jenkins.i3m.upv.es/buildStatus/icon?job=grycap/im-unit)](http://jenkins.i3m.upv.es/job/grycap/job/im-unit/) IM is a tool that deploys complex and customized virtual infrastructures on IaaS diff --git a/changelog b/changelog index 25a829bdc..9efe44bad 100644 --- a/changelog +++ b/changelog @@ -358,3 +358,7 @@ IM 1.6.4 * Decrease timeout getting ansible process results. * Enable to get the initial infrastructure contextualization log. +IM 1.6.5 + * Homogenize Inf ID log message + * Fix error cpu.count parameter is ignored in OpenStack conn. + * Fix ansible_version is not available in ctxt process. diff --git a/doc/source/client.rst b/doc/source/client.rst index c62a37cea..209aea49c 100644 --- a/doc/source/client.rst +++ b/doc/source/client.rst @@ -102,9 +102,10 @@ The :program:`im_client` is called like this:: Stop (but not remove) the specified virtual machine ``vmId`` associated to the infrastructure with ID infrastructure with ID ``infId``. - ``sshvm infId vmId`` + ``sshvm infId vmId [show_only]`` Connect with SSH with the specified virtual machine ``vmId`` associated to the infrastructure with ID - infrastructure with ID ``infId``. + infrastructure with ID ``infId``. The ``show_only`` parameter is optional and is a flag to specify if ssh + command will only be shown in stdout instead of executed. ``export infId delete`` Export the data of the infrastructure with ID ``infId``. The ``delete`` parameter is optional diff --git a/docker-devel/Dockerfile b/docker-devel/Dockerfile index ffceb73b4..7bdc2ce0f 100644 --- a/docker-devel/Dockerfile +++ b/docker-devel/Dockerfile @@ -2,7 +2,7 @@ FROM grycap/jenkins:ubuntu16.04-im ARG BRANCH=devel MAINTAINER Miguel Caballer -LABEL version="1.6.4" +LABEL version="1.6.5" LABEL description="Container image to run the IM service. (http://www.grycap.upv.es/im)" EXPOSE 8899 8800 diff --git a/docker/Dockerfile b/docker/Dockerfile index 0b9c52a42..d60e2b88d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ # Dockerfile to create a container with the IM service FROM ubuntu:16.04 LABEL maintainer="Miguel Caballer " -LABEL version="1.6.4" +LABEL version="1.6.5" LABEL description="Container image to run the IM service. (http://www.grycap.upv.es/im)" EXPOSE 8899 8800 @@ -18,7 +18,7 @@ RUN pip install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-co RUN apt-get update && apt-get install --no-install-recommends -y gcc libmysqld-dev libssl-dev libffi-dev libsqlite3-dev && \ pip install MySQL-python && \ pip install xmltodict && \ - pip install IM==1.6.4 && \ + pip install IM==1.6.5 && \ apt-get remove -y gcc libmysqld-dev libssl-dev libffi-dev libsqlite3-dev python-dev python-pip && \ apt-get autoremove -y && \ rm -rf /var/lib/apt/lists/* diff --git a/test/files/test.radl b/test/files/test.radl index fcdc88d5f..c192076fb 100644 --- a/test/files/test.radl +++ b/test/files/test.radl @@ -69,6 +69,7 @@ configure test ( - easy_install: name=jmespath tasks: - debug: msg="NODENAME = {{NODENAME}}" + - debug: msg="VERSION = {{ansible_version.major}}" - shell: test -d "/mnt/disk/lost+found" @end