From d82aa6e4a66f0197fdf580542407b07904f960a3 Mon Sep 17 00:00:00 2001 From: Anton Sidelnikov <53078276+anton-sidelnikov@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:36:06 +0200 Subject: [PATCH] update tags docs and tests (#75) Update tags docs and tests Make it clear for users Reviewed-by: Artem Lifshits --- README.md | 3 ++- docs/supported-options-v0.3.x.md | 2 +- driver/flags.go | 2 +- driver/opentelekomcloud_test.go | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 08c958e..56ca5d1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenTelekomCloud Docker Machine driver -[![Zuul Gate](https://zuul.eco.tsi-dev.otc-service.com/api/tenant/eco/badge?project=opentelekomcloud/docker-machine-opentelekomcloud&pipeline=check&branch=devel)](https://zuul.eco.tsi-dev.otc-service.com/t/eco/builds?project=opentelekomcloud%2Fdocker-machine-opentelekomcloud) +[![Zuul Gate](https://zuul.otc-service.com/api/tenant/eco/badge?project=opentelekomcloud/docker-machine-opentelekomcloud&pipeline=check&branch=devel)](https://zuul.eco.tsi-dev.otc-service.com/t/eco/builds?project=opentelekomcloud%2Fdocker-machine-opentelekomcloud) [![Go Report Card](https://goreportcard.com/badge/github.com/opentelekomcloud/docker-machine-opentelekomcloud)](https://goreportcard.com/report/github.com/opentelekomcloud/docker-machine-opentelekomcloud) ![GitHub](https://img.shields.io/github/license/opentelekomcloud/docker-machine-opentelekomcloud) @@ -28,6 +28,7 @@ There are two more options of docker-machine driver suitable for usage with Open | AK/SK auth | Yes | Yes | No | | Server group | **Yes** | No | No | | Security group(s) | Multiple | Single | Multiple | +| Instance Tags | Multiple | No | No | | Rancher integration | Needs setup | Built-in | Built-in | ### Installation diff --git a/docs/supported-options-v0.3.x.md b/docs/supported-options-v0.3.x.md index 7a612a5..f600d2d 100644 --- a/docs/supported-options-v0.3.x.md +++ b/docs/supported-options-v0.3.x.md @@ -38,7 +38,7 @@ | `--otc-subnet-id` | `OS_SUBNET_ID` | | Subnet ID the machine will be connected on | | `--otc-subnet-name` | `OS_SUBNET_NAME` | subnet-docker-machine | Subnet name the machine will be connected on | | `--otc-token` | `OS_TOKEN` | | Authorization token | -| `--otc-tags` | `OS_TAGS` | | Comma-separated list of instance tags | +| `--otc-tags` | `OS_TAGS` | | Comma-separated list of instance tags (e.g. key1.value1,key2.value2,key3) | | `--otc-user-data-file` | `OS_USER_DATA_FILE` | | File containing an userdata script | | `--otc-user-data-raw` | | | Contents of user data file as a string | | `--otc-username` | `OS_USERNAME` | | OpenTelekomCloud username | diff --git a/driver/flags.go b/driver/flags.go index 63f3fd1..4b3ef44 100644 --- a/driver/flags.go +++ b/driver/flags.go @@ -229,7 +229,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag { mcnflag.StringFlag{ Name: "otc-tags", EnvVar: "OS_TAGS", - Usage: "Comma-separated list of instance tags", + Usage: "Comma-separated list of instance tags (e.g. key1.value1,key2.value2,key3)", }, } } diff --git a/driver/opentelekomcloud_test.go b/driver/opentelekomcloud_test.go index 2ac6b6e..0121aca 100644 --- a/driver/opentelekomcloud_test.go +++ b/driver/opentelekomcloud_test.go @@ -28,7 +28,7 @@ var ( "otc-cloud": defaultCloud(), "otc-subnet-name": subnetName, "otc-vpc-name": vpcName, - "otc-tags": "machine,test", + "otc-tags": "machine.dmd,test.value,empty", "otc-availability-zone": defaultAz(), } testEnv = openstack.NewEnv("OS_") @@ -136,7 +136,7 @@ func TestDriver_Create(t *testing.T) { "otc-project-name": testEnv.GetEnv("PROJECT_NAME"), "otc-subnet-name": defaultFlags["otc-subnet-name"], "otc-vpc-name": defaultFlags["otc-vpc-name"], - "otc-tags": "machine,test", + "otc-tags": "machine.dmd,test.value,empty", }, } for name, flags := range testFlags {