Class: Dcmgr::Scheduler::Network::VifTemplate

Inherits:
Dcmgr::Scheduler::NetworkScheduler show all
Defined in:
lib/dcmgr/scheduler/network/vif_template.rb

Overview

Setup vnics by following InstanceSpec#vifs template.

Instance Method Summary collapse

Methods inherited from Dcmgr::Scheduler::NetworkScheduler

#initialize

Constructor Details

This class inherits a constructor from Dcmgr::Scheduler::NetworkScheduler

Instance Method Details

#schedule(instance) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/dcmgr/scheduler/network/vif_template.rb', line 9

def schedule(instance)
  instance.spec.vifs.each { |name, vif|
    vnic = instance.add_nic(vif)
    vnic.network = Models::Network[@options[name]]
    vnic.save
  }
end