diff --git a/soi/compute.py b/soi/compute.py index a970dbffccf1bec2b32532e8b3fd99e5a13f925e..eca4f843b64c5f3ca4f65eb60cfbb222c75d27cd 100644 --- a/soi/compute.py +++ b/soi/compute.py @@ -231,11 +231,13 @@ function_map = { 'get_flavor': snf_get_flavor, 'get_images': snf_get_images, 'get_image': snf_get_image, - 'get_floating_ip_pools': empty_list_200, 'get_server_volumes_link': snf_get_server_volumes_link, '_get_ports': snf_get_server_net_attachments, 'delete': snf_delete_server, 'create_server': snf_create_server, 'run_action': snf_run_action, - 'keypair_create': keypair_register + 'keypair_create': keypair_register, + # TODO: Implement these when you do networks + 'get_floating_ips': empty_list_200, # Helps in server delete + 'get_floating_ip_pools': empty_list_200, } diff --git a/soi/tests/funcional/rocci/compute.sh b/soi/tests/funcional/rocci/compute.sh index 949998fecded9edffb5a34fa2ea297904f8cd22c..2554bcc3c5b3bdaa95650bb682648f19eb9c472e 100755 --- a/soi/tests/funcional/rocci/compute.sh +++ b/soi/tests/funcional/rocci/compute.sh @@ -89,7 +89,7 @@ echo echo "Create a server instance" echo "Meaning: kamaki server create --name \"OCCI test VM\" \\" -echo " --flavor-id <ID of c2r2048d40drb> --image-id <ID of ${OS_TPL}>" +echo " --flavor-id ${RESOURCE_TPL} --image-id ${OS_TPL}" CMD="${BASE_CMD} --action create --resource compute " CMD="${CMD} --attribute occi.core.title=\"OCCI test VM\"" CMD="${CMD} --mixin os_tpl#${OS_TPL} --mixin resource_tpl#${RESOURCE_TPL}" @@ -174,16 +174,8 @@ else eval $ACMD echo - WAIT=5; - while [ $STATE == 'active' ] - do - echo "Server state is ${STATE}, wait ${WAIT}\" and check again" - sleep $WAIT; - let "WAIT++"; - eval $CMD; - STATE=(`awk '/occi.compute.state/{n=split($0,a," = "); print a[2];}' ${VM_INFO}`); - done; - echo "Server state is $STATE" + sleep 10 + WAIT=5; while [ $STATE != 'active' ] do @@ -198,9 +190,9 @@ else echo "Destroy server instance ${SUFFIX}"; echo "Meaning: kamaki server delete ${SERVER_URL}"; - CMD="${BASE_CMD} --action delete --resource ${SUFFIX}"; - echo "$CMD"; - eval $CMD; + ACMD="${BASE_CMD} --action delete --resource ${SUFFIX}"; + echo "$ACMD"; + eval $ACMD; WAIT=5; while [ $STATE == 'active' ] @@ -236,7 +228,7 @@ echo echo "Create a server instance with PPK" echo "Meaning: kamaki server create --name \"OCCI test VM\" \\" echo " --flavor-id ${RESOURCE_TPL} --image-id ${OS_TPL} \\" -echo " -p (`pwd`)/id_rsa.pub,/root/.ssh/authorized_keys,root,root,0600" +echo " -p `pwd`/id_rsa.pub,/root/.ssh/authorized_keys,root,root,0600" CMD="${BASE_CMD} --action create --resource compute" CMD="${CMD} --attribute occi.core.title=\"OCCI test VM\"" CMD="${CMD} --mixin os_tpl#${OS_TPL} --mixin resource_tpl#${RESOURCE_TPL}" diff --git a/soi/wsgi.py b/soi/wsgi.py index ebbbdf33cac429fec743e3fc850156509f2e16f8..525d078c3dee970e0f4c39a3ff56418b4f87ae57 100644 --- a/soi/wsgi.py +++ b/soi/wsgi.py @@ -17,7 +17,7 @@ from ooi.wsgi import OCCIMiddleware from ooi.api.helpers import OpenStackHelper from soi.config import KEYSTONE_URL from soi.synnefo import AstakosClient, AUTH_URL -from soi import utils, compute, storage, storage_link +from soi import utils, compute, storage, storage_link, network from kamaki.clients import ClientError