Adding validation for per-service deploy
* check that components names are correct * check that requested componets are not deployed * check that all required components already exist/requested Change-Id: I110eb8cdb8c450e9fd6b6cd8726a27bf1a7d4ac8
This commit is contained in:
@@ -6,6 +6,7 @@ from oslo_log import log as logging
|
||||
import yaml
|
||||
|
||||
import fuel_ccp
|
||||
from fuel_ccp import kubernetes
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
@@ -74,3 +75,13 @@ def get_deploy_components_info():
|
||||
'service_content': service_definition
|
||||
}
|
||||
return components_map
|
||||
|
||||
|
||||
def get_deployed_components():
|
||||
"""Returns set of deployed components."""
|
||||
deployed_daemonsets = kubernetes.list_cluster_daemonsets()
|
||||
deployed_deployments = kubernetes.list_cluster_deployments()
|
||||
deployed_components = set(kubernetes.get_object_names(
|
||||
deployed_daemonsets + deployed_deployments))
|
||||
|
||||
return deployed_components
|
||||
|
||||
Reference in New Issue
Block a user