Merge juju-bmc:libjuju-increase-frame-size into juju-bmc:master

Proposed by Jose Guedez
Status: Merged
Approved by: Jose Guedez
Approved revision: c072ceb7173671ab1526abab276424cd33e3cb9c
Merged at revision: 3165081c49d869ced1245cd650a51ed0b02e8a6e
Proposed branch: juju-bmc:libjuju-increase-frame-size
Merge into: juju-bmc:master
Diff against target: 36 lines (+6/-3)
2 files modified
juju-bmc/juju-bmc (+5/-2)
setup.py (+1/-1)
Reviewer Review Type Date Requested Status
Joe Guo (community) Approve
Review via email: mp+385340@code.launchpad.net

Commit message

increase libjuju max_frame_size to deal with large production models

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Joe Guo (guoqiao) wrote :

LGTM, +1.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 3165081c49d869ced1245cd650a51ed0b02e8a6e

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/juju-bmc/juju-bmc b/juju-bmc/juju-bmc
index 70a1953..1659bb4 100755
--- a/juju-bmc/juju-bmc
+++ b/juju-bmc/juju-bmc
@@ -75,13 +75,16 @@ def parse_args():
75 return parser.parse_args()75 return parser.parse_args()
7676
7777
78async def get_machine_instance_id(machine_id):78async def get_machine_instance_id(machine_id, max_frame_size=2 ** 25):
79 """79 """
80 Connects to the juju controller using default credentials in $HOME80 Connects to the juju controller using default credentials in $HOME
81 to obtain the instance id of the provided machine_id81 to obtain the instance id of the provided machine_id
82 """82 """
83 # connect to the current juju controller/model83 # connect to the current juju controller/model
84 model = Model()84 # for some production clouds the messages can be larger than the
85 # default of 4MB, so we increase the frame size with a larger value
86 # for details see https://github.com/juju/python-libjuju/issues/136
87 model = Model(max_frame_size=max_frame_size)
85 await model.connect()88 await model.connect()
8689
87 machine = model.machines.get(machine_id)90 machine = model.machines.get(machine_id)
diff --git a/setup.py b/setup.py
index 3dd7f92..a874b6d 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
44
5setup(5setup(
6 name='juju-bmc',6 name='juju-bmc',
7 version='0.11',7 version='0.2.0',
8 url='https://launchpad.net/juju-bmc',8 url='https://launchpad.net/juju-bmc',
9 author='Canonical Bootstack',9 author='Canonical Bootstack',
10 author_email="bootstack@canonical.com",10 author_email="bootstack@canonical.com",

Subscribers

People subscribed via source and target branches

to all changes: