Updated Branches: refs/heads/master 392feacd2 -> 264a0670a
- [CLOUDSTACK-509] S3-backed Secondary Storage - Adds S3 configuration support to Marvin - Moves configuration of global options to occur creation of zones since the values of global options impact the configuration and zone enablement processes Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/264a0670 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/264a0670 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/264a0670 Branch: refs/heads/master Commit: 264a0670a85e4a8b36ddd17a38cbb8b2ec718946 Parents: 392feac Author: John Burwell <[email protected]> Authored: Wed Dec 19 17:26:38 2012 -0500 Committer: Prasanna Santhanam <[email protected]> Committed: Wed Dec 19 16:09:25 2012 -0800 ---------------------------------------------------------------------- tools/marvin/marvin/deployDataCenter.py | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/264a0670/tools/marvin/marvin/deployDataCenter.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index 7bdd975..ba124cb 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -414,10 +414,29 @@ class deployDataCenters(): updateCfg.value = config.value self.apiClient.updateConfiguration(updateCfg) + def copyAttributesToCommand(self, source, command): + + map(lambda attr : setattr(command, attr, getattr(source, attr, None)), + filter(lambda attr : not attr.startswith("__") and + attr not in [ "required", "isAsync" ], dir(command))) + + + def configureS3(self, s3): + + if s3 is None: + return + + command = addS3.addS3Cmd() + + self.copyAttributesToCommand(s3, command) + + self.apiClient.addS3(command) + def deploy(self): self.loadCfg() - self.createZones(self.config.zones) self.updateConfiguration(self.config.globalConfig) + self.createZones(self.config.zones) + self.configureS3(self.config.s3) if __name__ == "__main__":
