From a3936e5bd58e833782a9f3d04fec73a6cb13d1f3 Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Mon, 23 Dec 2019 16:20:00 +0100 Subject: [PATCH] --create-hostame defaults to cluster name Closes: #466 --- openappstack/__main__.py | 4 ++-- openappstack/cluster.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openappstack/__main__.py b/openappstack/__main__.py index d267ed6aa..81dda75f4 100755 --- a/openappstack/__main__.py +++ b/openappstack/__main__.py @@ -68,8 +68,8 @@ def main(): # pylint: disable=too-many-statements,too-many-branches,too-many-lo create_parser.add_argument( '--create-hostname', type=str, - help='hostname of the machine. If not provided for a new machine, a ' - 'hostname is generated.') + help='hostname of the machine. If not provided for a new machine, the ' + 'cluster name is used.') group = create_parser.add_mutually_exclusive_group(required=True) diff --git a/openappstack/cluster.py b/openappstack/cluster.py index 340144270..0d6f74baa 100644 --- a/openappstack/cluster.py +++ b/openappstack/cluster.py @@ -90,8 +90,7 @@ class Cluster: the cluster name """ if hostname is None: - # Use random generated ID in case we're not running in - # gitlab CI and there's no CI_PIPELINE_ID env var + # If hostname is not set use cluster name for it. hostname = self.name droplet = greenhost_cloud.create_droplet( name=hostname, -- GitLab