this is a big branch so i'm going to break up the review into multiple
passes. Overall it looks good, but i have a few questions about some of
the behavior ic wrt to waiting for post-boot network setup and md server
availability (bootstrap node instance id access) that i'd like to
discuss with you and document.
Hi Martin,
this is a big branch so i'm going to break up the review into multiple
passes. Overall it looks good, but i have a few questions about some of
the behavior ic wrt to waiting for post-boot network setup and md server
availability (bootstrap node instance id access) that i'd like to
discuss with you and document.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/environmen t/config. py t/config. py (right):
File juju/environmen
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/environmen t/config. py#newcode57 t/config. py:57: "default- instance- type": String(), instance- type shouldn't be needed as a
juju/environmen
given constraint support default-
config option.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/errors. py
File juju/errors.py (right):
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/errors. py#newcode162 ids)))
juju/errors.py:162: ", ".join(map(str, self.instance_
looks fine, but curious why needed, instance ids should always be
integers.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ client. py openstack/ client. py (right):
File juju/providers/
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ client. py#newcode158 openstack/ client. py:158: response, body = yield deferred
juju/providers/
style minors, deferred transient isn't needed.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ client. py#newcode166 openstack/ client. py:166: [self.token] = headers. getRawHeaders( "X-Auth- Token")
juju/providers/
response.
haven't seen this style before, preferable to just index 0 off the
result.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ client. py#newcode295 openstack/ client. py:295: flavor_id = yield flavor( flavor_ name)
juju/providers/
self._lookup_
please document the kw params supported (sec groups and ipv4).
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ client. py#newcode309 openstack/ client. py:309: server[ "accessIPv4" ] = ip
juju/providers/
what's this for?
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ files.py openstack/ files.py (right):
File juju/providers/
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ files.py# newcode78 openstack/ files.py: 78: if response.code != 201:
juju/providers/
its likely the original error is more interesting at this point.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ launch. py openstack/ launch. py (right):
File juju/providers/
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ launch. py#newcode61 openstack/ launch. py:61: if self._master:
juju/providers/
is the md service not available?
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ launch. py#newcode89 openstack/ launch. py:89: yield filestorage. put(id_ name, server[ 'id']))
juju/providers/
StringIO(
have you run into this in practice?, it seems hard to achieve, but good
to note nonetheless.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ launch. py#newcode99 openstack/ launch. py:99: reactor. callLater( 5,
juju/providers/
deferred.callback, None)
ouch!.. you have to wait for the servers to boot to attach a public ip?
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ machine. py openstack/ machine. py (right):
File juju/providers/
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ machine. py#newcode25 openstack/ machine. py:25: return STATE_MAP. get(status, 'unknown')
juju/providers/
_SERVER_
nice. thanks for mapping this. its not a general requirement atm, but
its very nice to use a common vocabulary here.
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ provider. py openstack/ provider. py (right):
File juju/providers/
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ provider. py#newcode41 openstack/ provider. py:41: # XXX: Why pass empty strings
juju/providers/
rather than raising on missing config?
good question, better to just raise, and have it required in config.py
https:/ /codereview. appspot. com/6312050/ diff/1/ juju/providers/ openstack/ provider. py#newcode198 openstack/ provider. py:198: return defer.gatherRes ults(
juju/providers/
we have a helper for this in lib/twistutils.py
https:/ /codereview. appspot. com/6312050/