def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_job = {'name': 'test_job', 'minutes': '25'}
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection()
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection(kind='version') # whether to use a mock or a simulator self.use_vsim = False
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_nfs_group = { 'vserver': 'nfs_vserver', }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection('aggregate', '12', 'name') # whether to use a mock or a simulator self.onbox = False
def setUp(self): self.mock_module = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module.start() self.mock_sleep = patch('time.sleep') self.mock_sleep.start() set_module_args({}) self.addCleanup(self.mock_module.stop) self.addCleanup(self.mock_sleep.stop)
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_ndmp = { 'ignore_ctime_enabled': 'true', 'backup_log_enable': 'false' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_cifs_security = { 'is_aes_encryption_enabled': 'true', 'lm_compatibility_level': 'krb' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_access_policy = { 'state': 'present', 'vserver': 'test_vserver', 'policy_name': 'test_carchi' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_key_manager = { 'node_name': 'test_node', 'tcp_port': 5696, 'ip_address': '0.0.0.0', 'server_status': 'available' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_group = { 'name': 'test', 'id': '11', 'vserver': 'something', }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_policy_group = { 'name': 'policy_1', 'vserver': 'policy_vserver', 'max_throughput': '800KB/s,800IOPS', 'min_throughput': '100IOPS' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_role = { 'name': 'testrole', 'access_level': 'all', 'command_directory_name': 'volume', 'vserver': 'ansible' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_ifgrp = { 'name': 'test', 'port': 'a1', 'node': 'test_vserver', 'mode': 'something' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_port = { 'node': 'test', 'ports': 'a1', 'flowcontrol_admin': 'something', 'mtu': '1000' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_rule = { 'name': 'test', 'protocol': 'nfs', 'client_match': '1.1.1.0', 'rule_index': 10 }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_onDemand = { 'state': 'present', 'vserver': 'test_vserver', 'report_directory': '/', 'task_name': '/', 'scan_paths': '/' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_broadcast_domain = { 'name': 'test_broadcast_domain', 'mtu': '1000', 'ipspace': 'Default', 'ports': 'test_port_1' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_net_route = { 'destination': '176.0.0.0/24', 'gateway': '10.193.72.1', 'vserver': 'test_vserver', 'metric': '70' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_lun_copy = { 'source_vserver': 'ansible', 'destination_path': '/vol/test/test_copy_dest_dest_new_reviewd_new', 'source_path': '/vol/test/test_copy_1', 'destination_vserver': 'ansible', 'state': 'present' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_asup = { 'node_name': 'test-vsim1', 'transport': 'https', 'support': 'false', 'post_url': 'testbed.netapp.com/asupprod/post/1.0/postAsup', 'proxy_url': 'something.com', }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_scanner = { 'state': 'present', 'scanner_pool': 'test_pool', 'vserver': 'test_vserver', 'hostnames': ['host1', 'host2'], 'privileged_users': ['domain\\admin', 'domain\\carchi8py'], 'scanner_policy': 'primary' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_policy_group = { 'name': 'policy_1', 'vserver': 'policy_vserver', 'absolute_min_iops': '50IOPS', 'expected_iops': '150IOPS/TB', 'peak_iops': '220IOPS/TB', 'peak_iops_allocation': 'used_space' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_sp = { 'node': 'test-vsim1', 'gateway_ip_address': '2.2.2.2', 'address_type': 'ipv4', 'ip_address': '1.1.1.1', 'netmask': '255.255.248.0', 'dhcp': 'v4' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_autosize = { 'grow_threshold_percent': 99, 'maximum_size': '10g', 'minimum_size': '21m', 'increment_size': '10m', 'mode': 'grow', 'shrink_threshold_percent': 40, 'vserver': 'test_vserver', 'volume': 'test_volume' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_policy = { 'policy': 'test', 'service': 'http', 'vserver': 'my_vserver', 'allow_list': '1.2.3.0/24' } self.mock_config = { 'node': 'test', 'enable': 'enable', 'logging': 'enable' }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.server = MockONTAPConnection() self.mock_cluster_peer = { 'source_intercluster_lifs': '1.2.3.4,1.2.3.5', 'dest_intercluster_lifs': '1.2.3.6,1.2.3.7', 'passphrase': 'netapp123', 'dest_hostname': '10.20.30.40', 'dest_cluster_name': 'cluster2', 'hostname': 'hostname', 'username': '******', 'password': '******', }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) # make sure to change this to False before submitting self.onbox = False self.dummy_args = dict() for arg in ('hostname', 'username', 'password'): self.dummy_args[arg] = arg if self.onbox: self.args = { 'hostname': '10.193.78.219', 'username': '******', 'password': '******', } else: self.args = self.dummy_args self.server = MockONTAPConnection()
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_interface = { 'name': 'test_lif', 'administrative-status': 'up', 'failover-policy': 'up', 'firewall-policy': 'up', 'is-auto-revert': 'true', 'home_node': 'node', 'role': 'test', 'home_port': 'e0c', 'address': '2.2.2.2', 'netmask': '1.1.1.1', 'dns_domain_name': 'test.com', 'listen_for_dns_query': True, 'is_dns_update_enabled': True }
def setUp(self): self.mock_module_helper = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json) self.mock_module_helper.start() self.addCleanup(self.mock_module_helper.stop) self.mock_vol = { 'name': 'test_vol', 'aggregate': 'test_aggr', 'junction_path': '/test', 'vserver': 'test_vserver', 'size': 20971520, 'unix_permissions': '755', 'snapshot_policy': 'default', 'qos_policy_group': 'performance', 'qos_adaptive_policy_group': 'performance', 'percent_snapshot_space': 60, 'language': 'en', 'vserver_dr_protection': 'unprotected', 'comment': 'test comment' }