예제 #1
0
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
예제 #2
0
def _nodes_status_unmanaged(module, lxca_con):
    return nodes(lxca_con, status='unmanaged')
예제 #3
0
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'])
예제 #4
0
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'])
예제 #5
0
def _nodes(module, lxca_con):
    return nodes(lxca_con)