virt_net modify should fail when tag is not host (#53679)

* fail if tag is not host
* actually use modify command in example
pull/54058/head
Sascha Marcel Schmidt 6 years ago committed by Abhijeet Kasurde
parent ac7df0ef65
commit e23b116157

@ -133,6 +133,7 @@ EXAMPLES = '''
# Add a new host in the dhcp pool # Add a new host in the dhcp pool
- virt_net: - virt_net:
name: br_nat name: br_nat
command: modify
xml: "<host mac='FC:C2:33:00:6c:3c' name='my_vm' ip='192.168.122.30'/>" xml: "<host mac='FC:C2:33:00:6c:3c' name='my_vm' ip='192.168.122.30'/>"
''' '''
@ -273,8 +274,8 @@ class LibvirtConnection(object):
res = 0 res = 0
if res == 0: if res == 0:
return True return True
# command, section, parentIndex, xml, flags=0 # command, section, parentIndex, xml, flags=0
self.module.fail_json(msg='updating this is not supported yet %s' % to_native(xml)) self.module.fail_json(msg='updating this is not supported yet %s' % to_native(xml))
def destroy(self, entryid): def destroy(self, entryid):
if not self.module.check_mode: if not self.module.check_mode:

Loading…
Cancel
Save