Sha256: 5d6c5197ef571719e069c1b9088e6f2e8dac0d7b62d4efbc7c71b672d77e559f

Contents?: true

Size: 442 Bytes

Versions: 2

Compression:

Stored size: 442 Bytes

Contents

# -*- coding: utf-8 -*-

module Dcmgr
  module Scheduler
    module Network
      # Setup vnics by following InstanceSpec#vifs template.
      class VifTemplate < NetworkScheduler
        
        def schedule(instance)
          instance.spec.vifs.each { |name, vif|
            vnic = instance.add_nic(vif)
            vnic.network = Models::Network[@options[name]]
            vnic.save
          }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wakame-vdc-agents-11.12.0 lib/dcmgr/scheduler/network/vif_template.rb
wakame-vdc-dcmgr-11.12.0 lib/dcmgr/scheduler/network/vif_template.rb