def main(): """ Main function """ argument_spec = dict( credential=dict(required=True, type='dict', no_log=True), vfid=dict(required=False, type='int'), throttle=dict(required=False, type='float'), timeout=dict(required=False, type='float'), n_port_settings=dict(required=False, type='dict')) module = AnsibleModule( argument_spec=argument_spec, supports_check_mode=True ) input_params = module.params # Set up state variables fos_ip_addr = input_params['credential']['fos_ip_addr'] fos_user_name = input_params['credential']['fos_user_name'] fos_password = input_params['credential']['fos_password'] https = input_params['credential']['https'] throttle = input_params['throttle'] timeout = input_params['timeout'] vfid = input_params['vfid'] n_port_settings = input_params['n_port_settings'] result = {"changed": False} singleton_helper(module, fos_ip_addr, fos_user_name, fos_password, https, True, throttle, vfid, "brocade_access_gateway", "n_port_settings", n_port_settings, result, timeout)
def main(): """ Main function """ argument_spec = dict( credential=dict(required=True, type='dict', no_log=True), vfid=dict(required=False, type='int'), throttle=dict(required=False, type='float'), timeout=dict(required=False, type='float'), fabric=dict(required=True, type='dict')) module = AnsibleModule( argument_spec=argument_spec, supports_check_mode=True ) input_params = module.params # Set up state variables fos_ip_addr = input_params['credential']['fos_ip_addr'] fos_user_name = input_params['credential']['fos_user_name'] fos_password = input_params['credential']['fos_password'] https = input_params['credential']['https'] ssh_hostkeymust = True if 'ssh_hostkeymust' in input_params['credential']: ssh_hostkeymust = input_params['credential']['ssh_hostkeymust'] throttle = input_params['throttle'] timeout = input_params['timeout'] vfid = input_params['vfid'] fabric = input_params['fabric'] result = {"changed": False} singleton_helper(module, fos_ip_addr, fos_user_name, fos_password, https, ssh_hostkeymust, throttle, vfid, "brocade_fibrechannel_configuration", "fabric", fabric, result, timeout)
def main(): """ Main function """ argument_spec = dict(credential=dict(required=True, type='dict', no_log=True), vfid=dict(required=False, type='int'), throttle=dict(required=False, type='float'), timeout=dict(required=False, type='float'), module_name=dict(required=True, type='str'), obj_name=dict(required=True, type='str'), attributes=dict(required=True, type='dict')) module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) input_params = module.params # Set up state variables fos_ip_addr = input_params['credential']['fos_ip_addr'] fos_user_name = input_params['credential']['fos_user_name'] fos_password = input_params['credential']['fos_password'] https = input_params['credential']['https'] ssh_hostkeymust = True if 'ssh_hostkeymust' in input_params['credential']: ssh_hostkeymust = input_params['credential']['ssh_hostkeymust'] throttle = input_params['throttle'] timeout = input_params['timeout'] vfid = input_params['vfid'] module_name = str_to_human(input_params['module_name']) obj_name = str_to_human(input_params['obj_name']) attributes = input_params['attributes'] result = {"changed": False} singleton_helper(module, fos_ip_addr, fos_user_name, fos_password, https, ssh_hostkeymust, throttle, vfid, module_name, obj_name, attributes, result, timeout)