diff --git a/lib/tiny-cloud/cloud/alpine/imds b/lib/tiny-cloud/cloud/alpine/imds deleted file mode 120000 index 104b5ca..0000000 --- a/lib/tiny-cloud/cloud/alpine/imds +++ /dev/null @@ -1 +0,0 @@ -../nocloud/imds \ No newline at end of file diff --git a/lib/tiny-cloud/cloud/alpine/init b/lib/tiny-cloud/cloud/nocloud/init similarity index 100% rename from lib/tiny-cloud/cloud/alpine/init rename to lib/tiny-cloud/cloud/nocloud/init diff --git a/lib/tiny-cloud/init b/lib/tiny-cloud/init index c257cda..b874497 100644 --- a/lib/tiny-cloud/init +++ b/lib/tiny-cloud/init @@ -295,6 +295,11 @@ init__set_ssh_keys() { ### load cloud-specific init functions / vars (potentially overriding) +if [ "$CLOUD" = "alpine" ]; then + log -i -t "$phase" warn "CLOUD provider alpine is deprecated. Use nocloud" + CLOUD="nocloud" +fi + if [ -f "$LIBDIR/tiny-cloud/cloud/$CLOUD/init" ]; then . "$LIBDIR/tiny-cloud/cloud/$CLOUD/init" fi diff --git a/tests/imds.test b/tests/imds.test index 366e763..47e8a7a 100755 --- a/tests/imds.test +++ b/tests/imds.test @@ -5,13 +5,12 @@ . $(atf_get_srcdir)/test_env.sh export PREFIX="$srcdir" -PROVIDERS="alpine aws azure gcp nocloud scaleway" +PROVIDERS="aws azure gcp nocloud scaleway" init_tests \ imds_help \ imds_space \ \ - imds_hostname_alpine \ imds_hostname_aws \ imds_hostname_azure \ imds_hostname_gcp \ @@ -20,7 +19,6 @@ init_tests \ imds_hostname_scaleway \ imds_hostname_hetzner \ \ - imds_local_hostname_alpine \ imds_local_hostname_aws \ imds_local_hostname_azure \ imds_local_hostname_gcp \ @@ -29,7 +27,6 @@ init_tests \ imds_local_hostname_scaleway \ imds_local_hostname_hetzner \ \ - imds_ssh_keys_alpine \ imds_ssh_keys_aws \ imds_ssh_keys_azure \ imds_ssh_keys_gcp \ @@ -68,7 +65,6 @@ check_hostname() { EOF CLOUD="$1" atf_check -o match:"myhostname" imds @hostname } -imds_hostname_alpine_body() { check_hostname alpine; } imds_hostname_aws_body() { check_hostname aws; } imds_hostname_azure_body() { check_hostname azure; } imds_hostname_gcp_body() { check_hostname gcp; } @@ -97,7 +93,6 @@ check_local_hostname() { EOF CLOUD="$1" atf_check -o match:"myhostname" imds @local-hostname } -imds_local_hostname_alpine_body() { check_local_hostname alpine; } imds_local_hostname_aws_body() { check_local_hostname aws; } imds_local_hostname_azure_body() { check_local_hostname azure; } imds_local_hostname_gcp_body() { check_local_hostname gcp; } @@ -135,7 +130,6 @@ check_ssh_keys() { EOF CLOUD="$1" atf_check -o match:"$key" imds @ssh-keys } -imds_ssh_keys_alpine_body() { check_ssh_keys alpine; } imds_ssh_keys_aws_body() { check_ssh_keys aws; } imds_ssh_keys_azure_body() { check_ssh_keys azure; } imds_ssh_keys_gcp_body() { check_ssh_keys gcp; } diff --git a/tests/init.test b/tests/init.test index 21a42ea..5ebfa8e 100755 --- a/tests/init.test +++ b/tests/init.test @@ -25,7 +25,7 @@ init_tests \ userdata_type \ run_userdata -PROVIDERS="alpine aws azure gcp nocloud oci scaleway hetzner" +PROVIDERS="aws azure gcp nocloud oci scaleway hetzner" expand_root_body() { mkdir proc diff --git a/tests/tiny-cloud-alpine.test b/tests/tiny-cloud-alpine.test index e0a1866..0dba727 100755 --- a/tests/tiny-cloud-alpine.test +++ b/tests/tiny-cloud-alpine.test @@ -6,8 +6,7 @@ export PREFIX="$srcdir" export MOCK=echo -export CLOUD=alpine -lib="$srcdir"/lib/tiny-cloud/cloud/alpine/init +export CLOUD=nocloud init_tests \ set_ephemeral_network_cmdline \