6a864bb4ba
* no new commands/flags implemented - if object already exists, it will be updated * only Deployment, ConfigMap, Service can be updated * if deployment spec was not updated, but related configmaps were, deployment will be updated * deployments will be updated with RollingUpdate strategy Change-Id: If8fe78d6bea95b11d87f243cadc79490736745e7
20 lines
790 B
Python
20 lines
790 B
Python
from fuel_ccp.common import utils
|
|
from fuel_ccp import dependencies
|
|
|
|
|
|
def validate_requested_components(components, components_map):
|
|
"""Validate requested components.
|
|
|
|
Validate that all components required for successful deployment of
|
|
requested components are provided or already deployed.
|
|
"""
|
|
deployed_components = utils.get_deployed_components()
|
|
required_components = dependencies.get_deps(components, components_map)
|
|
|
|
not_provided_components = (required_components - components -
|
|
deployed_components)
|
|
if not_provided_components:
|
|
raise RuntimeError('Following components are also required for '
|
|
'successful deployment: '
|
|
'%s' % ' '.join(not_provided_components))
|