Class: VCenterDriver::OpaqueNetwork

Inherits:
Network
  • Object
show all
Defined in:
lib/network.rb

Overview

Class OpaqueNetwork

Constant Summary

Constants inherited from Network

Network::NETWORK_TYPE_DPG, Network::NETWORK_TYPE_NSXT, Network::NETWORK_TYPE_NSXV, Network::NETWORK_TYPE_PG, Network::NETWORK_TYPE_UNKNOWN, Network::REQUIRED_ATTRS

Instance Attribute Summary

Attributes inherited from Network

#item

Instance Method Summary collapse

Methods inherited from Network

create_one_network, generate_name, get_network_type, new_from_ref, nic?, remove_net_ref, retrieve_vlanid, to_one, to_one_template, virtual_switch, vlanid

Methods included from Memoize

#[], #[]=, #clear, #clear_all

Constructor Details

#initialize(item, vi_client = nil, _check = true) ⇒ OpaqueNetwork

Returns a new instance of OpaqueNetwork.



440
441
442
443
444
# File 'lib/network.rb', line 440

def initialize(item, vi_client = nil, _check = true)
    check_item(item, RbVmomi::VIM::OpaqueNetwork)

    super(item, vi_client, false)
end

Instance Method Details

#clustersObject



446
447
448
449
450
451
452
453
454
455
# File 'lib/network.rb', line 446

def clusters
    net_clusters = {}
    host_members =@item['host']
    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_typeObject



457
458
459
# File 'lib/network.rb', line 457

def network_type
    VCenterDriver::Network::NETWORK_TYPE_NSXT
end