def _get_nodes(module, kwargs): result = None try: with connection_object(module, kwargs) as con: result = nodes(con, kwargs.get('uuid')) except Exception as err: module.fail_json(msg="Error getting nodes inventory " + str(err)) return result
def _nodes_status_unmanaged(module, lxca_con): return nodes(lxca_con, status='unmanaged')
def _nodes_by_chassis_uuid(module, lxca_con): if not module.params['chassis']: module.fail_json(msg=CHASSIS_UUID_REQUIRED) return nodes(lxca_con, chassis=module.params['chassis'])
def _nodes_by_uuid(module, lxca_con): if not module.params['uuid']: module.fail_json(msg=UUID_REQUIRED) return nodes(lxca_con, module.params['uuid'])
def _nodes(module, lxca_con): return nodes(lxca_con)