def _service_get_hg_state(hg_name, resp):
    '''Method to Service Hybrid Group State Get Request'''
    hg_list = fp.get_hybrid_group_list()

    if hg_list is None:
        nas_if.log_err("Hybrid Group list is None")
        return False

    if hg_name != None and hg_name in hg_list:
        #Add One
        o = create_hg_state_cps_obj(hg_list[hg_name])
        if None is o:
            nas_if.log_err("Failed to add %s to Hybrid Group State list" %
                           str(hg_name))
        resp.append(o.get())
        return True
    else:
        #Add All
        for name in hg_list:
            o = create_hg_state_cps_obj(hg_list[name])
            if None is o:
                nas_if.log_err("Failed to add %s to Hybrid Group State list" %
                               str(name))
            resp.append(o.get())
        return True
def _service_set_hg(hg_name, obj, resp):
    '''Method to Service Hybrid Group Set Request'''
    hg_list = fp.get_hybrid_group_list()

    if hg_name is None or hg_name not in hg_list:
        nas_if.log_err('Error in reading Hybrid Group Name')
        return False

    if True is apply_cps_config_to_hg(obj, hg_list[hg_name]):
        resp = create_hg_cps_obj(hg_list[hg_name]).get()
        return True

    return False