Francesco Romani has uploaded a new change for review.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
**WIP** tool: reconfigure containers networks
TODO: properly integrate into vdsm-tool
Added as PoC/placeholder
Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Signed-off-by: Francesco Romani fromani@redhat.com --- A contrib/cont-setup-net 1 file changed, 53 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/18/60918/1
diff --git a/contrib/cont-setup-net b/contrib/cont-setup-net new file mode 100755 index 0000000..7bc7c07 --- /dev/null +++ b/contrib/cont-setup-net @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +# TODO: integrate into vdsm-tool + +import argparse +import logging +import sys + +from vdsm.virt.containers import config +from vdsm.virt.containers import runtime + + +_DEFAULT_OVIRT_NET = 'ovirtmgmt' +_DEFAULT_SUBNET = '10.1.0.0' +_DEFAULT_MASK = 24 + + +def _main(): + parser = argparse.ArgumentParser() + parser.add_argument('--name', type=str, nargs='?', + default=_DEFAULT_OVIRT_NET, + help='network name to use') + parser.add_argument('--bridge', type=str, nargs='?', + default=_DEFAULT_OVIRT_NET, + help='bridge to use') + parser.add_argument('--subnet', type=str, nargs='?', + default=_DEFAULT_SUBNET, + help='subnet to use') + parser.add_argument('--mask', type=int, nargs='?', + default=_DEFAULT_MASK, + help='netmask to use') + args = parser.parse_args() + + runtimes = convirt.runtime.supported() + if not runtimes: + logging.warning('no runtimes detected, nothing to do') + return + + logging.info('configuring runtimes: %s', runtimes) + + config.network.update( + name=args.name, + bridge=args.bridge, + subnet=args.subnet, + mask=args.mask, + ) + + runtime.configure() + + +if __name__ == "__main__": + logging.basicConfig(level=logging.DEBUG) + _main()
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 3:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 4:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 5:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 6:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 7:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 8:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 9:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 10:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 11:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 12:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 13:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 14:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 15:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 16:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 17:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 18:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 19:
* Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 20:
* Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 21:
* Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 22:
* Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 23:
* Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: **WIP** tool: reconfigure containers networks ......................................................................
Patch Set 24:
* Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
vdsm-patches@lists.fedorahosted.org