ppouliot / puppet-openstack_hyper_v

A starting point for building Windows/Hyper-V OpenStack Compute nodes
Other
6 stars 4 forks source link

Refactoring: created hyper_v.pp class & extracted windows_feature to its own file #15

Closed luisfdez closed 11 years ago

luisfdez commented 11 years ago

Hi,

I've created a new hyper_v.pp to install & configure Hyper-V, my idea is to use this new class as the init.pp of the future Hyper-V module.

hyper-v
|----manifests
     |---------> init.pp (hyper_v.pp)
     |---------> live_migration.pp
|----lib
     (...)
      |---------> virtual_switch.rb

Now, it just enables Hyper-V (and tools, make it optional?) and restart the computer if it's required.

Also, I've done some refactoring in commands.pp, I've extracted the add_windows_feature/remove_windows_feature to its own define file base\windows_feature.pp. With this modification, the features are defined according to the followin structure:

openstack_hyper_v::base::windows_feature { 'Hyper-V':
  ensure => present,
}

It follows the rules mentioned here: http://docs.puppetlabs.com/puppet/3/reference/lang_defined_types.html

Is it ok for you?