[ https://issues.apache.org/jira/browse/DTACLOUD-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13582508#comment-13582508 ]
Ronelle Landy commented on DTACLOUD-477: ---------------------------------------- AFAICT, the patches attached to DTACLOUD-488 do not fix the problem of the n/a realm .. - Did a git pull from master - Applied the patches in tracker.deltacloud.org/set/328 - Started the deltacloud server - using the -P option and the full provider: >> ./bin/deltacloudd -i openstack -P >> "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/;az-2.region-a.geo-1" Starting Deltacloud API :: openstack :: https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/;az-2.region-a.geo-1 :: http://localhost:3001/api - Created an instance ( I tried this several times, passing no realm, (passing the provider string (should not be valid), passing 'default' - there is only one default realm, I think) >> curl -X POST -F "image_id=67663" --user "un:pw" >> "http://localhost:3001/api/instances?format=xml" <?xml version='1.0' encoding='utf-8' ?> <instance href='http://localhost:3001/api/instances/1139281' id='1139281'> <name>server2013-02-20 15:09:10 -0500</name> <owner_id>....</owner_id> <image href='http://localhost:3001/api/images/67663' id='67663'></image> <realm href='http://localhost:3001/api/realms/az-2.region-a.geo-1' id='az-2.region-a.geo-1'></realm> <state>PENDING</state> <hardware_profile href='http://localhost:3001/api/hardware_profiles/100' id='100'> </hardware_profile> <actions> </actions> <launch_time>2013-02-20T20:09:14Z</launch_time> <public_addresses></public_addresses> <private_addresses></private_addresses> <storage_volumes></storage_volumes> <authentication type='key'> <login> <username>root</username> <password><...></password> </login> </authentication> </instance> [root@qeblade39 ~]# Note that the realm id is returned as: id='az-2.region-a.geo-1 - this is the provider now ... Doing a GET on realms returns: curl -X GET --user "un:pw" "http://localhost:3001/api/realms?format=xml" <?xml version='1.0' encoding='utf-8' ?> <realms> <realm href='http://localhost:3001/api/realms/default' id='default'> <name>default</name> <state>AVAILABLE</state> <limit><![CDATA[ABSOLUTE >> Max. Instances: 20 Max. RAM: 102400 ||]]></limit> </realm> </realms> Now query the instance created: [root@qeblade39 ~]# curl -X GET --user "un:pw" "http://localhost:3001/api/instances/1139281?format=xml" <?xml version='1.0' encoding='utf-8' ?> <instance href='http://localhost:3001/api/instances/1139281' id='1139281'> <name>server2013-02-20 15:09:10 -0500</name> <owner_id>...</owner_id> <image href='http://localhost:3001/api/images/67663' id='67663'></image> <realm href='http://localhost:3001/api/realms/n/a' id='n/a'></realm> <state>PENDING</state> <hardware_profile href='http://localhost:3001/api/hardware_profiles/100' id='100'> </hardware_profile> <actions> </actions> <launch_time>2013-02-20T20:09:14Z</launch_time> <public_addresses><address type='ipv4'>15.185.179.37</address></public_addresses> <private_addresses><address type='ipv4'>10.6.37.87</address></private_addresses> <storage_volumes></storage_volumes> <authentication type='key'> <login> <username>root</username> <password><![CDATA[....]]></password> </login> </authentication> </instance> Note that realm is still reported as: <realm href='http://localhost:3001/api/realms/n/a' id='n/a'></realm> > Openstack provider: Realms id not correctly reported from GET > /api/instance/Instance_id > --------------------------------------------------------------------------------------- > > Key: DTACLOUD-477 > URL: https://issues.apache.org/jira/browse/DTACLOUD-477 > Project: DeltaCloud > Issue Type: Bug > Components: Native/Frontend > Environment: Deltacloud 1.1.1 - gem under test > Openstack provider > Reporter: Ronelle Landy > Assignee: Marios Andreou > > Create an instance passing a realm_id - note that this realm is the same as > the one where the image resides: > >> curl -X POST -F "image_id=67663" -F "realm_id=az-2.region-a.geo-1" --user > >> "un:pw" > >> "http://amd-pike-06.lab.bos.redhat.com:3001/api/instances?format=json" > {"instance":{"id":"1099283","href":"http://amd-pike-06.lab.bos.redhat.com:3001/api/instances/1099283","name":"server2013-02-14 > 12:17:20 > -0500","state":"PENDING","owner":"....","image":{"href":"http://amd-pike-06.lab.bos.redhat.com:3001/api/images/67663","id":"67663","rel":"image"}, > "realm":{"href":"http://amd-pike-06.lab.bos.redhat.com:3001/api/realms/az-2.region-a.geo-1","id":"az-2.region-a.geo-1","rel":"realm"}," > actions":[],"hardware_profile":{"id":"100","href":"http://amd-pike-06.lab.bos.redhat.com:3001/api/hardware_profiles/100","rel":"hardware_profile","properties":{}},"public_addresses":[],"private_addresses":[],"create_time":"2013-02-14T17:17:28Z","storage_volumes":[],"authentication_type":"key","authentication":{"user":"root","password":"uQiHTRW5ircK5Mzz"}}} > All good above. > Now GET the instance ... not that the realm is reported as: > <realm href='http://amd-pike-06.lab.bos.redhat.com:3001/api/realms/n/a' > id='n/a'></realm> > >> curl -X GET --user "un:pw" > >> "http://amd-pike-06.lab.bos.redhat.com:3001/api/instances/1099283?format=xml"<?xml > >> version='1.0' encoding='utf-8' ?> > <instance > href='http://amd-pike-06.lab.bos.redhat.com:3001/api/instances/1099283' > id='1099283'> > <name>server2013-02-14 12:17:20 -0500</name> > <owner_id>...</owner_id> > <image href='http://amd-pike-06.lab.bos.redhat.com:3001/api/images/67663' > id='67663'></image> > <realm href='http://amd-pike-06.lab.bos.redhat.com:3001/api/realms/n/a' > id='n/a'></realm> > <state>RUNNING</state> > <hardware_profile > href='http://amd-pike-06.lab.bos.redhat.com:3001/api/hardware_profiles/100' > id='100'> > </hardware_profile> > <actions> > <link > href='http://amd-pike-06.lab.bos.redhat.com:3001/api/instances/1099283/reboot' > method='post' rel='reboot' /> > <link > href='http://amd-pike-06.lab.bos.redhat.com:3001/api/instances/1099283/stop' > method='post' rel='stop' /> > <link > href='http://amd-pike-06.lab.bos.redhat.com:3001/api/images;instance_id=1099283' > method='post' rel='create_image' /> > </actions> > <launch_time>2013-02-14T17:17:28Z</launch_time> > <public_addresses><address > type='ipv4'>15.185.178.1</address></public_addresses> > <private_addresses><address > type='ipv4'>10.7.103.19</address></private_addresses> > <storage_volumes></storage_volumes> > <authentication type='key'> > <login> > <username>root</username> > <password><![CDATA[]]></password> > </login> > </authentication> > </instance> > [root@cloud-qe-3 tests]# > This fails deltacloud/test/instances_test.rb. > test_0011_should allow to create new instance using image, realm and > hardware_profile(Deltacloud API instances collection) [instances_test.rb:282]: > Expected: "az-2.region-a.geo-1" > Actual: "n/a" -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira