diff options
author | 2018-10-05 08:35:07 -0700 | |
---|---|---|
committer | 2018-10-05 08:35:07 -0700 | |
commit | 5878ca891f41df871d69169a411fdfccf4ff74c1 (patch) | |
tree | 0566f7a206c21a9ac811eb7c18b7a9e6f5ea7fb9 /vagrant/tests/virtlet.sh | |
parent | 373ab2024543a1d3c0d025715e80c3755995d6b5 (diff) |
Using VirtletCloudInitUserData section
The VirtletCloudInitUserData section defines instructions used by
cloud-init service to post-provisioning VMs. But this section cannot
be used with VirtletCloudInitUserDataScript in the Deployment file
definition. This changer replaces these virtlet sections.
Change-Id: I03f5fee223d43b21ceadd50bc356cec4e96cab23
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: MULTICLOUD-301
Diffstat (limited to 'vagrant/tests/virtlet.sh')
-rwxr-xr-x | vagrant/tests/virtlet.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vagrant/tests/virtlet.sh b/vagrant/tests/virtlet.sh index 4a43ff34..f941789c 100755 --- a/vagrant/tests/virtlet.sh +++ b/vagrant/tests/virtlet.sh @@ -25,13 +25,18 @@ pushd ${CSAR_DIR}/${csar_id} setup $virtlet_deployment_name # Test -kubectl plugin virt virsh list deployment_pod=$(kubectl get pods | grep $virtlet_deployment_name | awk '{print $1}') -virsh_image=$(kubectl plugin virt virsh list | grep "virtlet-.*-$deployment_pod") -if [[ -z "$virsh_image" ]]; then +vm_name=$(kubectl plugin virt virsh list | grep "virtlet-.*-$virtlet_deployment_name" | awk '{print $2}') +vm_status=$(kubectl plugin virt virsh list | grep "virtlet-.*-$virtlet_deployment_name" | awk '{print $3}') +if [[ "$vm_status" != "running" ]]; then echo "There is no Virtual Machine running by $deployment_pod pod" exit 1 fi +echo "Pod name: $deployment_pod Virsh domain: $vm_name" +echo "ssh testuser@$(kubectl get pods $deployment_pod -o jsonpath="{.status.podIP}")" +echo "kubectl attach -it $deployment_pod" +echo "=== Virtlet details ====" +echo "$(kubectl plugin virt virsh dumpxml $vm_name | grep VIRTLET_)\n" popd # Teardown |