+def get_server_security_group_names(nova, server):
+ """
+ Returns a server with a given id
+ :param nova: the Nova client
+ :param server: the old server object
+ :return: the list of security groups associated with a VM
+ """
+ out = list()
+ os_vm_inst = __get_latest_server_os_object(nova, server)
+ for sec_grp_dict in os_vm_inst.security_groups:
+ out.append(sec_grp_dict['name'])
+ return out
+
+
+def get_server_info(nova, server):
+ """
+ Returns a dictionary of a VMs info as returned by OpenStack
+ :param nova: the Nova client
+ :param server: the old server object
+ :return: a dict of the info if VM exists else None
+ """
+ vm = __get_latest_server_os_object(nova, server)
+ if vm:
+ return vm._info
+ return None
+
+