Skip to content

unable to list networks unless projectid is also sent. #184

@BEfelipe

Description

@BEfelipe

when networks are not available to in default and only available for individual projects, the api call to listNetworks will not return any networks unless the projectid is sent as part of the API call.

in this case, this plugin fails to find the network_name or network_id

example.

curl 'http://cloudstack.example.com:8080/client/api?command=listNetworks&id=bat-80&projectid=08bbf424-f99e-4306-9b8b-a5693e5e783f&apikey=XXXXXXXXXXXXX&signature=XXXXXXXXXXX'

1 607e9baa-8219-464b-aba7-653b39b9d0dd bat-80

curl 'http://cloudstack.example.com:8080/client/api?command=listNetworks&name=bat-80&apikey=XXXXXXXXXX&signature=XXXXXXXXX'

  • xmllint --format -
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 114 100 114 0 0 4252 0 --:--:-- --:--:-- --:--:-- 4384

Vagrant fails to lookup the network ID or NAME

==> default: Fetching UUID for network with name 'bat-80'
/Users/XXX/.vagrant.d/gems/2.4.4/gems/vagrant-cloudstack-1.5.0/lib/vagrant-cloudstack/service/cloudstack_resource_service.rb:47:in resourcefield_to_id': No UUID found for network with name 'bat-80' (VagrantPlugins::Cloudstack::Exceptions::CloudstackResourceNotFound) from /Users/XXXX/.vagrant.d/gems/2.4.4/gems/vagrant-cloudstack-1.5.0/lib/vagrant-cloudstack/service/cloudstack_resource_service.rb:65:in name_to_id'
from /Users/XXXX/.vagrant.d/gems/2.4.4/gems/vagrant-cloudstack-1.5.0/lib/vagrant-cloudstack/service/cloudstack_resource_service.rb:17:in `sync_resource'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions