From b282b4d3ca4ac8bff59c049f2ba0582503087c69 Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Mon, 29 Aug 2016 11:46:44 +0300 Subject: [PATCH] Renaming all "mcp" occurrences to "ccp" Change-Id: Ic5bc5295330450bc925ad01ff204e897118fb881 --- fuel_ccp/config/cli.py | 4 ++-- fuel_ccp/kubernetes.py | 4 ++-- fuel_ccp/templates.py | 22 +++++++++++----------- fuel_ccp/tests/test_deploy.py | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/fuel_ccp/config/cli.py b/fuel_ccp/config/cli.py index dce1d1e4..a6c4ddc8 100644 --- a/fuel_ccp/config/cli.py +++ b/fuel_ccp/config/cli.py @@ -8,12 +8,12 @@ def add_parsers(subparsers): build_action = subparsers.add_parser('build') build_action.add_argument('-c', '--components', nargs='+', - help='MCP component to build') + help='CCP component to build') deploy_action = subparsers.add_parser('deploy') deploy_action.add_argument('-c', '--components', nargs='+', - help='MCP component to deploy') + help='CCP component to deploy') deploy_action.add_argument("--dry-run", action='store_true', help="Print k8s objects definitions without" diff --git a/fuel_ccp/kubernetes.py b/fuel_ccp/kubernetes.py index 7d06d7ec..0aac5cbb 100644 --- a/fuel_ccp/kubernetes.py +++ b/fuel_ccp/kubernetes.py @@ -97,7 +97,7 @@ def list_cluster_daemonsets(): api = apisextensionsvbeta_api.ApisextensionsvbetaApi(client) return api.list_namespaced_daemon_set( namespace=CONF.kubernetes.namespace, - label_selector="mcp=true").items + label_selector="ccp=true").items def list_cluster_deployments(): @@ -105,7 +105,7 @@ def list_cluster_deployments(): api = apisextensionsvbeta_api.ApisextensionsvbetaApi(client) return api.list_namespaced_deployment( namespace=CONF.kubernetes.namespace, - label_selector="mcp=true").items + label_selector="ccp=true").items def get_object_names(items): diff --git a/fuel_ccp/templates.py b/fuel_ccp/templates.py index b583e103..bc6ad14b 100644 --- a/fuel_ccp/templates.py +++ b/fuel_ccp/templates.py @@ -15,7 +15,7 @@ FILES_CONFIG = "files" META_CONFIG = "meta" ROLE_CONFIG = "role" -ENTRYPOINT_PATH = "/opt/mcp_start_script/bin/start_script.py" +ENTRYPOINT_PATH = "/opt/ccp_start_script/bin/start_script.py" def _get_image_name(image_name): @@ -41,7 +41,7 @@ def serialize_configmap(name, data): "metadata": { "name": name, "labels": { - "mcp": "true" + "ccp": "true" } }, "data": data @@ -52,23 +52,23 @@ def serialize_volume_mounts(container): spec = [ { "name": GLOBAL_CONFIG, - "mountPath": "/etc/mcp/%s" % GLOBAL_CONFIG + "mountPath": "/etc/ccp/%s" % GLOBAL_CONFIG }, { "name": ROLE_CONFIG, - "mountPath": "/etc/mcp/%s" % ROLE_CONFIG + "mountPath": "/etc/ccp/%s" % ROLE_CONFIG }, { "name": META_CONFIG, - "mountPath": "/etc/mcp/%s" % META_CONFIG + "mountPath": "/etc/ccp/%s" % META_CONFIG }, { "name": SCRIPT_CONFIG, - "mountPath": "/opt/mcp_start_script/bin" + "mountPath": "/opt/ccp_start_script/bin" }, { "name": FILES_CONFIG, - "mountPath": "/etc/mcp/%s" % FILES_CONFIG + "mountPath": "/etc/ccp/%s" % FILES_CONFIG } ] for v in container.get("volumes", ()): @@ -240,7 +240,7 @@ def serialize_job(name, spec): "metadata": { "name": name, "labels": { - "mcp": "true" + "ccp": "true" } }, "spec": { @@ -262,7 +262,7 @@ def serialize_deployment(name, spec, affinity): "metadata": { "annotations": affinity, "labels": { - "mcp": "true", + "ccp": "true", "app": name } }, @@ -284,7 +284,7 @@ def serialize_daemonset(name, spec, affinity): "metadata": { "annotations": affinity, "labels": { - "mcp": "true", + "ccp": "true", "app": name } }, @@ -327,7 +327,7 @@ def serialize_service(name, ports): "metadata": { "name": name, "labels": { - "mcp": "true" + "ccp": "true" } }, "spec": { diff --git a/fuel_ccp/tests/test_deploy.py b/fuel_ccp/tests/test_deploy.py index 7da44ebd..3e7020d0 100644 --- a/fuel_ccp/tests/test_deploy.py +++ b/fuel_ccp/tests/test_deploy.py @@ -177,7 +177,7 @@ apiVersion: v1 kind: Service metadata: labels: - mcp: "true" + ccp: "true" name: foo spec: ports: