Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597)

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* to resolve the bug 40709

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* to fix shippable nios automation error

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* review comment fix

* shippable error fix

* shippable error fix
This commit is contained in:
Sumit Jaiswal 2018-05-31 12:25:15 +05:30 committed by GitHub
parent 6d3a1786cc
commit 81510970ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 156 additions and 135 deletions

View file

@ -59,13 +59,13 @@ class TestNiosZoneModule(TestNiosModule):
self.load_config.return_value = dict(diff=None, session='session')
def test_nios_zone_create(self):
self.module.params = {'provider': None, 'state': 'present', 'name': 'ansible.com',
self.module.params = {'provider': None, 'state': 'present', 'fqdn': 'ansible.com',
'comment': None, 'extattrs': None}
test_object = None
test_spec = {
"name": {"ib_req": True},
"fqdn": {"ib_req": True},
"comment": {},
"extattrs": {}
}
@ -75,10 +75,10 @@ class TestNiosZoneModule(TestNiosModule):
res = wapi.run('testobject', test_spec)
self.assertTrue(res['changed'])
wapi.create_object.assert_called_once_with('testobject', {'name': 'ansible.com'})
wapi.create_object.assert_called_once_with('testobject', {'fqdn': 'ansible.com'})
def test_nios_zone_remove(self):
self.module.params = {'provider': None, 'state': 'absent', 'name': 'ansible.com',
self.module.params = {'provider': None, 'state': 'absent', 'fqdn': 'ansible.com',
'comment': None, 'extattrs': None}
ref = "zone/ZG5zLm5ldHdvcmtfdmlldyQw:ansible/false"
@ -86,12 +86,12 @@ class TestNiosZoneModule(TestNiosModule):
test_object = [{
"comment": "test comment",
"_ref": ref,
"name": "ansible.com",
"fqdn": "ansible.com",
"extattrs": {'Site': {'value': 'test'}}
}]
test_spec = {
"name": {"ib_req": True},
"fqdn": {"ib_req": True},
"comment": {},
"extattrs": {}
}
@ -102,20 +102,20 @@ class TestNiosZoneModule(TestNiosModule):
wapi.delete_object.assert_called_once_with(ref)
def test_nios_zone_update_comment(self):
self.module.params = {'provider': None, 'state': 'present', 'name': 'ansible.com',
self.module.params = {'provider': None, 'state': 'present', 'fqdn': 'ansible.com',
'comment': 'updated comment', 'extattrs': None}
test_object = [
{
"comment": "test comment",
"_ref": "zone/ZG5zLm5ldHdvcmtfdmlldyQw:default/true",
"name": "ansible.com",
"fqdn": "ansible.com",
"extattrs": {'Site': {'value': 'test'}}
}
]
test_spec = {
"name": {"ib_req": True},
"fqdn": {"ib_req": True},
"comment": {},
"extattrs": {}
}