Merge lp://staging/~fwereade/pyjuju/cobbler-connect-production into lp://staging/pyjuju
Proposed by
William Reade
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Kapil Thangavelu | ||||
Approved revision: | 318 | ||||
Merged at revision: | 291 | ||||
Proposed branch: | lp://staging/~fwereade/pyjuju/cobbler-connect-production | ||||
Merge into: | lp://staging/pyjuju | ||||
Prerequisite: | lp://staging/~fwereade/pyjuju/config-selectdict | ||||
Diff against target: |
468 lines (+352/-11) 9 files modified
ensemble/environment/config.py (+6/-0) ensemble/environment/tests/test_config.py (+34/-0) ensemble/lib/testing.py (+2/-0) ensemble/providers/orchestra/__init__.py (+22/-8) ensemble/providers/orchestra/cobbler.py (+107/-0) ensemble/providers/orchestra/launch.py (+20/-0) ensemble/providers/orchestra/machine.py (+6/-0) ensemble/providers/orchestra/tests/test_bootstrap.py (+143/-0) ensemble/providers/orchestra/tests/test_provider.py (+12/-3) |
||||
To merge this branch: | bzr merge lp://staging/~fwereade/pyjuju/cobbler-connect-production | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kapil Thangavelu (community) | Approve | ||
Gustavo Niemeyer | Approve | ||
Review via email: mp+68706@code.staging.launchpad.net |
Description of the change
* added schema for orchestra provider
* added CobblerConnect for communicating with cobbler
* added OrchestraLaunch
To post a comment you must log in.
Looks nice. Just a few minors, and +1.
[1]
+ @property class(self) : "acquired- mgmt-class" ] class(self) : "available- mgmt-class" ] config[ "orchestra- user"], "orchestra- pass"])
+ def _acquired_
+ return self._config[
+
+ @property
+ def _available_
+ return self._config[
+
+ @property
+ def _credentials(self):
+ return (self._
+ self._config[
Not a big deal, but just as some feedback, this feels like
adding more complexity than necessary for the problem at
hand. Compare with this version:
self._ acquired_ class = self._config[ "acquired- mgmt-class" ] available_ class = self._config[ "available- mgmt-class" ] "orchestra- user"] "orchestra- pass"]
self._
self._user = self._config[
self._pass = self._config[
[2]
+ if "invalid token" not in failure. getErrorMessage (): ck(lambda unused: call())
+ return failure
+ login = self._login()
+ login.addCallba
Looks nice.
[3]
+ failure.trap(Fault) getErrorMessage ():
+ if "invalid token" not in failure.
+ return failure
None of that logic is covered by tests, though.
[4]
+ def check(actual):
+ if actual != expect:
+ raise ProviderError(
+ "Bad result from call to %s with %s (got %r, expected %r)"
+ % (name, args, actual, expect))
+ return actual
Also untouched by tests.
[5]
+ self.mock_proxy() get_systems( ) acquire_ system( ) set_ks_ meta() start_system( )
+ self.mock_
+ self.mock_
+ self.mock_
+ self.mock_
I guess there's no better way to test that interaction with the external system,
but I have to say I'm a bit sad about the amount of mocking here.