Code Review
/
fuel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Fix ssl cert upload path"
[fuel.git]
/
deploy
/
cloud
/
deploy.py
diff --git
a/deploy/cloud/deploy.py
b/deploy/cloud/deploy.py
index
07d5d57
..
dac2fe8
100644
(file)
--- a/
deploy/cloud/deploy.py
+++ b/
deploy/cloud/deploy.py
@@
-8,9
+8,6
@@
###############################################################################
###############################################################################
-import yaml
-import io
-
from dea import DeploymentEnvironmentAdapter
from configure_environment import ConfigureEnvironment
from deployment import Deployment
from dea import DeploymentEnvironmentAdapter
from configure_environment import ConfigureEnvironment
from deployment import Deployment
@@
-22,6
+19,7
@@
from common import (
check_file_exists,
commafy,
ArgParser,
check_file_exists,
commafy,
ArgParser,
+ log,
)
YAML_CONF_DIR = '/var/lib/opnfv'
)
YAML_CONF_DIR = '/var/lib/opnfv'
@@
-29,10
+27,12
@@
YAML_CONF_DIR = '/var/lib/opnfv'
class Deploy(object):
class Deploy(object):
- def __init__(self, dea_file, no_health_check, deploy_timeout):
+ def __init__(self, dea_file, no_health_check, deploy_timeout,
+ no_deploy_environment):
self.dea = DeploymentEnvironmentAdapter(dea_file)
self.no_health_check = no_health_check
self.deploy_timeout = deploy_timeout
self.dea = DeploymentEnvironmentAdapter(dea_file)
self.no_health_check = no_health_check
self.deploy_timeout = deploy_timeout
+ self.no_deploy_environment = no_deploy_environment
self.macs_per_blade = {}
self.blades = self.dea.get_node_ids()
self.blade_node_dict = self.dea.get_blade_node_map()
self.macs_per_blade = {}
self.blades = self.dea.get_node_ids()
self.blade_node_dict = self.dea.get_blade_node_map()
@@
-62,7
+62,10
@@
class Deploy(object):
dep = Deployment(self.dea, YAML_CONF_DIR, self.env_id,
self.node_roles_dict, self.no_health_check,
self.deploy_timeout)
dep = Deployment(self.dea, YAML_CONF_DIR, self.env_id,
self.node_roles_dict, self.no_health_check,
self.deploy_timeout)
- dep.deploy()
+ if not self.no_deploy_environment:
+ dep.deploy()
+ else:
+ log('Configuration is done. Deployment is not launched.')
def deploy(self):
def deploy(self):
@@
-81,14
+84,19
@@
def parse_arguments():
parser.add_argument('-dt', dest='deploy_timeout', action='store',
default=240, help='Deployment timeout (in minutes) '
'[default: 240]')
parser.add_argument('-dt', dest='deploy_timeout', action='store',
default=240, help='Deployment timeout (in minutes) '
'[default: 240]')
+ parser.add_argument('-nde', dest='no_deploy_environment',
+ action='store_true', default=False,
+ help=('Do not launch environment deployment'))
parser.add_argument('dea_file', action='store',
help='Deployment Environment Adapter: dea.yaml')
parser.add_argument('dea_file', action='store',
help='Deployment Environment Adapter: dea.yaml')
+
args = parser.parse_args()
check_file_exists(args.dea_file)
kwargs = {'dea_file': args.dea_file,
'no_health_check': args.no_health_check,
args = parser.parse_args()
check_file_exists(args.dea_file)
kwargs = {'dea_file': args.dea_file,
'no_health_check': args.no_health_check,
- 'deploy_timeout': args.deploy_timeout}
+ 'deploy_timeout': args.deploy_timeout,
+ 'no_deploy_environment': args.no_deploy_environment}
return kwargs
return kwargs