cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #02033
[Merge] ~raharper/cloud-init:fix-net-convert into cloud-init:master
Ryan Harper has proposed merging ~raharper/cloud-init:fix-net-convert into cloud-init:master.
Requested reviews:
cloud init development team (cloud-init-dev)
Related bugs:
Bug #1685944 in cloud-init (Ubuntu): "tools/net-convert: fix argument order for render_network_state"
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1685944
For more details, see:
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/323083
tools/net-convert: fix argument order for render_network_state
We're calling Renderer.render_network_state() with incorrect args.
% PYTHONPATH=`pwd` ./tools/net-convert.py --network-data simple-v2.yaml \
--kind yaml \
--output-kind netplan \
--directory ./target
Traceback (most recent call last):
File "./tools/net-convert.py", line 82, in <module>
main()
File "./tools/net-convert.py", line 78, in main
r.render_network_state(ns, target=args.directory)
TypeError: render_network_state() got multiple values for argument 'target'
The method signature requires passing <target dir>, <network_state>.
This patch fixes the call order.
Fixes: LP:1685944
--
Your team cloud init development team is requested to review the proposed merge of ~raharper/cloud-init:fix-net-convert into cloud-init:master.
diff --git a/tools/net-convert.py b/tools/net-convert.py
index 870da63..ec4ee64 100755
--- a/tools/net-convert.py
+++ b/tools/net-convert.py
@@ -75,7 +75,7 @@ def main():
r_cls = sysconfig.Renderer
r = r_cls()
- r.render_network_state(ns, target=args.directory)
+ r.render_network_state(args.directory, ns)
if __name__ == '__main__':
References