ppouliot/ppouliot-openstack-hyper-v — pull request #9 by luisfdez (2013-06-17 12:24:26+00:00)
Title: Feature: virtual_switch class

Hi Peter!,

This is the first version of the virtual switch. Due to the same problems I told you on Friday, I wasn't able yet to test it properly, so be aware of unexpected issues.

This one turned out not as easy to design as I though at the beginning. The functionality I've implemented covers the following scenarios:
```
class { 'openstack-hyper-v::base::virtual_switch':
name => 'br100',
}

class { 'openstack-hyper-v::base::virtual_switch':
name => 'internal_switch',
connection_type => 'Internal',
}

class { 'openstack-hyper-v::base::virtual_switch':
name => 'switch_to_be_removed',
enable => false,
}

class { 'openstack-hyper-v::base::virtual_switch':
name => 'external-switch-nic-2'
notes => 'Switch linked to non default address',
interface_address => '192.168.0.1',
switch_type => 'External',
os_managed => false,
}
```
The default interface address is set to the ipaddress fact, I think is a sane default value.

The 'enable' parameter was added to be able to handle old switch definitions, or situations where you want to 'rename' a switch.

As always, you feedback is welcomed :)