class VCenterDriver::DistributedPortGroup

Class DistributedPortGroup

Public Class Methods

new(item, vi_client = nil, _check = true) click to toggle source
Calls superclass method VCenterDriver::Network::new
# File lib/network.rb, line 408
def initialize(item, vi_client = nil, _check = true)
    check_item(item, RbVmomi::VIM::DistributedVirtualPortgroup)

    super(item, vi_client, false)
end

Public Instance Methods

clusters() click to toggle source
# File lib/network.rb, line 414
def clusters
    net_clusters = {}
    # should have to work
    # host_members =@item['host']
    host_members =
        self['config.distributedVirtualSwitch.summary.hostMember']
    host_members.each do |h|
        if !net_clusters.key?(h.parent._ref.to_s)
            net_clusters[h.parent._ref.to_s] = h.parent.name.to_s
        end
    end
    net_clusters
end
network_type() click to toggle source
# File lib/network.rb, line 428
def network_type
    VCenterDriver::Network::NETWORK_TYPE_DPG
end