Skip to content

Instantly share code, notes, and snippets.

@openstacker
Created February 25, 2019 19:54
Show Gist options
  • Save openstacker/9cea0ab27611c4a16f901c590e7e06fb to your computer and use it in GitHub Desktop.
Save openstacker/9cea0ab27611c4a16f901c590e7e06fb to your computer and use it in GitHub Desktop.
#!/bin/bash -x
IP="192.168.200.44"
CLUSTER="19367987-9cf9-49e6-9d47-84311313e545"
CT="38a32229-f642-4e9b-801a-42ee6e54b610"
# resize curl
example_req=$(cat << EOF
{
"node_count": 1,
"nodegroup": "master",
"nodes_to_remove": ["72ee3762-afcd-4082-b347-440a02a08da8"]
}
EOF
)
USER_TOKEN=$(openstack token issue -c id -f value)
curl -g -i -X PATCH http://${IP}:9511/v1/clusters/${CLUSTER}/actions/resize \
-H "OpenStack-API-Version: container-infra latest" \
-H "X-Auth-Token: $USER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "User-Agent: None" \
-d "$example_req"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment