def main():
    jrpc_urls = ['/pm/config/adom/{adom}/obj/application/group', '/pm/config/global/obj/application/group']
    perobject_jrpc_urls = ['/pm/config/adom/{adom}/obj/application/group/{group}', '/pm/config/global/obj/application/group/{group}']
    url_params = ['adom']
    module_primary_key = 'name'
    module_arg_spec = {'bypass_validation': {'type': 'bool', 'required': False, 'default': False}, 'workspace_locking_adom': {'type': 'str', 'required': False}, 'workspace_locking_timeout': {'type': 'int', 'required': False, 'default': 300}, 'rc_succeeded': {'required': False, 'type': 'list'}, 'rc_failed': {'required': False, 'type': 'list'}, 'state': {'type': 'str', 'required': True, 'choices': ['present', 'absent']}, 'adom': {'required': True, 'type': 'str'}, 'application_group': {'required': False, 'type': 'dict', 'options': {'application': {'required': False, 'type': 'int'}, 'category': {'required': False, 'type': 'int'}, 'comment': {'required': False, 'type': 'str'}, 'name': {'required': True, 'type': 'str'}, 'type': {'required': False, 'choices': ['application', 'category'], 'type': 'str'}}}}
    params_validation_blob = []
    check_galaxy_version(module_arg_spec)
    module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'application_group'), supports_check_mode=False)
    fmgr = None
    if module._socket_path:
        connection = Connection(module._socket_path)
        fmgr = NAPIManager(jrpc_urls, perobject_jrpc_urls, module_primary_key, url_params, module, connection, top_level_schema_name='data')
        fmgr.validate_parameters(params_validation_blob)
        fmgr.process_curd()
    else:
        module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
    module.exit_json(meta=module.params)
def main():
    jrpc_urls = ['/pm/config/adom/{adom}/obj/application/group', '/pm/config/global/obj/application/group']
    perobject_jrpc_urls = ['/pm/config/adom/{adom}/obj/application/group/{group}', '/pm/config/global/obj/application/group/{group}']
    url_params = ['adom']
    module_primary_key = 'name'
    module_arg_spec = {'bypass_validation': {'type': 'bool', 'required': False, 'default': False}, 'workspace_locking_adom': {'type': 'str', 'required': False}, 'workspace_locking_timeout': {'type': 'int', 'required': False, 'default': 300}, 'rc_succeeded': {'required': False, 'type': 'list'}, 'rc_failed': {'required': False, 'type': 'list'}, 'state': {'type': 'str', 'required': True, 'choices': ['present', 'absent']}, 'adom': {'required': True, 'type': 'str'}, 'application_group': {'required': False, 'type': 'dict', 'options': {'application': {'required': False, 'type': 'int'}, 'category': {'required': False, 'type': 'int'}, 'comment': {'required': False, 'type': 'str'}, 'name': {'required': True, 'type': 'str'}, 'type': {'required': False, 'choices': ['application', 'category'], 'type': 'str'}}}}
    params_validation_blob = []
    check_galaxy_version(module_arg_spec)
    module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'application_group'), supports_check_mode=False)
    fmgr = None
    if module._socket_path:
        connection = Connection(module._socket_path)
        fmgr = NAPIManager(jrpc_urls, perobject_jrpc_urls, module_primary_key, url_params, module, connection, top_level_schema_name='data')
        fmgr.validate_parameters(params_validation_blob)
        fmgr.process_curd()
    else:
        module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
    module.exit_json(meta=module.params)