mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 06:11:26 -07:00
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:
parent
6d3a1786cc
commit
81510970ae
13 changed files with 156 additions and 135 deletions
|
@ -56,7 +56,7 @@ class TestNiosApi(unittest.TestCase):
|
|||
{
|
||||
"comment": "test comment",
|
||||
"_ref": "networkview/ZG5zLm5ldHdvcmtfdmlldyQw:default/true",
|
||||
"name": "default",
|
||||
"name": self.module._check_type_dict().__getitem__(),
|
||||
"extattrs": {}
|
||||
}
|
||||
]
|
||||
|
@ -144,6 +144,7 @@ class TestNiosApi(unittest.TestCase):
|
|||
|
||||
kwargs = copy.deepcopy(test_object[0])
|
||||
kwargs['extattrs']['Site']['value'] = 'update'
|
||||
kwargs['name'] = self.module._check_type_dict().__getitem__()
|
||||
del kwargs['_ref']
|
||||
|
||||
wapi = self._get_wapi(test_object)
|
||||
|
@ -159,7 +160,7 @@ class TestNiosApi(unittest.TestCase):
|
|||
test_object = [{
|
||||
"comment": "test comment",
|
||||
"_ref": "networkview/ZG5zLm5ldHdvcmtfdmlldyQw:default/true",
|
||||
"name": "default",
|
||||
"name": self.module._check_type_dict().__getitem__(),
|
||||
"extattrs": {'Site': {'value': 'test'}}
|
||||
}]
|
||||
|
||||
|
@ -190,7 +191,7 @@ class TestNiosApi(unittest.TestCase):
|
|||
res = wapi.run('testobject', test_spec)
|
||||
|
||||
self.assertTrue(res['changed'])
|
||||
wapi.create_object.assert_called_once_with('testobject', {'name': 'ansible'})
|
||||
wapi.create_object.assert_called_once_with('testobject', {'name': self.module._check_type_dict().__getitem__()})
|
||||
|
||||
def test_wapi_delete(self):
|
||||
self.module.params = {'provider': None, 'state': 'absent', 'name': 'ansible',
|
||||
|
@ -240,6 +241,7 @@ class TestNiosApi(unittest.TestCase):
|
|||
kwargs = test_object[0].copy()
|
||||
ref = kwargs.pop('_ref')
|
||||
kwargs['comment'] = 'updated comment'
|
||||
kwargs['name'] = self.module._check_type_dict().__getitem__()
|
||||
del kwargs['network_view']
|
||||
del kwargs['extattrs']
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue