marvin-refactor: move the deployment helpers to deployer module

deployer module will contain all the helper modules used for json
description of data center and will also feature the export module for
exporting a datacenter in to json

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-09-07 10:55:12 +05:30
parent fac014d295
commit 44b3edcf75
3 changed files with 20 additions and 4 deletions

View File

@ -0,0 +1,16 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

View File

@ -856,7 +856,7 @@ if __name__ == "__main__":
with security groups")
parser.add_option("-o", "--output", action="store",
default="./datacenterCfg", dest="output",
help="the path where the json config file generated, \
help="the path where the json deployer file generated, \
by default is ./datacenterCfg")
(options, args) = parser.parse_args()

View File

@ -16,7 +16,6 @@
# under the License.
"""Deploy datacenters according to a json configuration file"""
import configGenerator
import cloudstackException
import cloudstackTestClient
import logging
@ -24,6 +23,7 @@ from cloudstackAPI import *
from os import path
from time import sleep
from optparse import OptionParser
from marvin.deployer import configGenerator
class deployDataCenters(object):
@ -517,7 +517,7 @@ class deployDataCenters(object):
self.config = configGenerator.getSetupConfig(self.configFile)
except:
raise cloudstackException.InvalidParameterException(
"Failed to load config %s" % self.configFile)
"Failed to load deployer %s" % self.configFile)
''' Retrieving Management Server Connection Details '''
mgtDetails = self.config.mgtSvr[0]
@ -602,7 +602,7 @@ if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-i", "--input", action="store",
default="./datacenterCfg", dest="input", help="the path \
where the json config file generated, by default is \
where the json deployer file generated, by default is \
./datacenterCfg")
(options, args) = parser.parse_args()