Skip to content

added basic support for networks#39

Merged
hartmantis merged 7 commits intotest-kitchen:masterfrom
monsterzz:create-server-with-nic-id
Feb 12, 2014
Merged

added basic support for networks#39
hartmantis merged 7 commits intotest-kitchen:masterfrom
monsterzz:create-server-with-nic-id

Conversation

@monsterzz
Copy link
Copy Markdown
Contributor

Adds network_ref to driver configuration to create instance in desired network.

By default, instance will be created in all available networks, and you need to pass openstack_network_name to select which one to use in ssh connection. In small OpenStack installations it's okay, but if you have big and company-wide shared installation it's inadmissible to allocate IP address in each available network.

@monsterzz
Copy link
Copy Markdown
Contributor Author

oh, snap. didn't checked existing pull requests :(

if you have any tips or issues on existing PRs I can fix them to integrate this feature as soon as possible.

Thanks.

@tenforward
Copy link
Copy Markdown
Contributor

Hi, I sent PR #38 😄
Your PR and mine is the same function, and your PR seem to be better than my code 👍 (because my code don't pass the cane 😣) But on my environment, yours doesn't work.

E, [2014-02-07T19:38:24.084337 #19752] ERROR -- Kitchen: Message: Failed to comp
lete #create action: [server is required for this operation]

"compute.network" in find_network method is correct? for example:

$ fog openstack
>> Compute[:openstack].networks
ArgumentError: server is required for this operation
  : (snip)

To get the list of networks, we need to do as follows?

>> Fog::Network[:openstack].networks
    <Fog::Network::OpenStack::Networks
      filters={}
      [
        <Fog::Network::OpenStack::Network
          id="a670ee93-521c-4012-8670-62d135869dde",
          name="ext_net",
          subnets=          <Fog::Network::OpenStack::Subnets
            filters={}
            [
              <Fog::Network::OpenStack::Subnet
                id="61fd6d79-dcda-443d-b42b-9a1240e0e0e8",
  : (snip)

I don't know the fog and openstack well, so I might be wrong. (or I may be mistaken in .kitchen.yml...)
Thanks.

@tenforward
Copy link
Copy Markdown
Contributor

... And can this allow to specify multiple networks ?

@monsterzz
Copy link
Copy Markdown
Contributor Author

damn it. last minute fix :(
will fix it today (also will add multiple nics support)

@hartmantis
Copy link
Copy Markdown
Contributor

Just a comment on @tenforward's comment earlier: what we discovered in #33 was that an unknown number of OpenStack environments (including all the ones I have access to for testing) don't run a network service, so calls to Fog::Network raise an exception. So just be careful if you're implementing that as part of your changes.

Otherwise, looks good to me so far, pending the in-progress edits.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.52%) when pulling ffd73a8 on monsterzz:create-server-with-nic-id into e685ff0 on test-kitchen:master.

@monsterzz
Copy link
Copy Markdown
Contributor Author

Fixed. Now you can specify one or multiple networks. I don't have openstack installation without network service, so I think it will raise smth like 'service not found' exception. I have mentioned it in docs.

I'm not fluent in english, so doc change require some corrections. Please have a look.

If you'll be comfortable with squashed version of this PR (one commit), I can squash it in new branch and send new PR.

Thanks.

@hartmantis
Copy link
Copy Markdown
Contributor

Awesome! With the new changes, this looks good to me. I don't have an OpenStack environment to test the new networking piece in, though. @tenforward, does this look like it will do what you need it to?

@tenforward
Copy link
Copy Markdown
Contributor

Hi!
On my environment, it works fine!! I can do what I need. Thanks!!

@hartmantis
Copy link
Copy Markdown
Contributor

Great! Thanks for confirming.

hartmantis added a commit that referenced this pull request Feb 12, 2014
@hartmantis hartmantis merged commit cec6cef into test-kitchen:master Feb 12, 2014
@monsterzz monsterzz deleted the create-server-with-nic-id branch February 12, 2014 19:46
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