Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set network_ids when using basic networking #168

Merged
merged 1 commit into from
Mar 22, 2017
Merged

Don't set network_ids when using basic networking #168

merged 1 commit into from
Mar 22, 2017

Conversation

hrak
Copy link

@hrak hrak commented Dec 21, 2016

In version 1.4.0, when using basic networking @networks is set to CloudstackResource.new(nil, nil, 'network') on this line, so @networks is never empty.

In this case @networks.map(&:id).compact.join(",") as used on this line results in an empty string.

This causes the deployVirtualMachine API request to include "networkids" => "" which makes CloudStack throw the error Can't specify network Ids in Basic zone.

…s in an empty string, which is the case when using basic networking
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6a822b1 on hrak:fix/no_network_ids_in_basic_zone into ** on MissionCriticalCloud:master**.

@miguelaferreira
Copy link
Contributor

@bheuvel are you able to test this?

@bheuvel
Copy link
Contributor

bheuvel commented Mar 1, 2017

@miguelaferreira possibly, mostly need to find the time to create an environment with basic networking. Don't have one running atm...

@miguelaferreira
Copy link
Contributor

ack

@bheuvel
Copy link
Contributor

bheuvel commented Mar 22, 2017

@hrak sorry for the long delay, but I don't have (time for creating) a basic zone.

Had a quick look at the cloudstack code, and it indeed only checks null value, not (even) empty strings.

Just tested it on Advanced zone and it has no negative side-effects, so will merge it.

@bheuvel
Copy link
Contributor

bheuvel commented Mar 22, 2017

Running RSpec tests in folder : vmlifecycle
Using Vagrant file            : Vagrantfile.advanced_networking

VM Life Cycle
  starts Linux and Windows VM
  destroys Linux and Windows VM

Finished in 2 minutes 19.8 seconds (files took 0.09403 seconds to load)
2 examples, 0 failures

Running RSpec tests in folder : networking
Using Vagrant file            : Vagrantfile.advanced_networking

Networking features
  creates firewall and portwarding rules for both Virtual Router and VPC

Finished in 3 minutes 32.9 seconds (files took 0.09126 seconds to load)
1 example, 0 failures

Running RSpec tests in folder : rsync
Using Vagrant file            : Vagrantfile.advanced_networking

VM RSync
  does rsync to the VM

Finished in 59.64 seconds (files took 0.09303 seconds to load)
1 example, 0 failures

@bheuvel bheuvel merged commit bf2a92d into MissionCriticalCloud:master Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants