From 22bb73effbb1696c801907b5d35384b3bef357ad Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 27 Mar 2018 16:39:41 -0700 Subject: [PATCH] Add migratetoken --- .zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.zshrc b/.zshrc index 7e518a2..0afa6d3 100644 --- a/.zshrc +++ b/.zshrc @@ -323,6 +323,7 @@ function getvm() { curl -H "X-AUTH-TOKEN: $(grep vmpooler_token ~/.fog | cut -d function sshvm() { ssh -i ~/.ssh/id_rsa-acceptance root@$1 ; } function rmvm() { curl -H "X-AUTH-TOKEN: $(grep vmpooler_token ~/.fog | cut -d ' ' -f 4)" -X DELETE --url vmpooler.delivery.puppetlabs.net/api/v1/vm/$1 ; } +function migratetoken() { curl -X POST -d '' -u hunter --url "https://nspooler-service-prod-1.delivery.puppetlabs.net/api/v1/token?token=$(grep vmpooler_token ~/.fog | cut -d ' ' -f 4)" } function listns() { curl -H "X-AUTH-TOKEN: $(grep vmpooler_token ~/.fog | cut -d ' ' -f 4)" -s -X GET --url https://nspooler-service-prod-1.delivery.puppetlabs.net/api/v1/status/ ; } function getns() { curl -H "X-AUTH-TOKEN: $(grep vmpooler_token ~/.fog | cut -d ' ' -f 4)" -d '' -X POST --url https://nspooler-service-prod-1.delivery.puppetlabs.net/api/v1/host/$1 ; } function sshns() { ssh -i ~/.ssh/id_rsa-acceptance root@$1 ; }