Class: VCenterDriver::PortGroup
Overview
Class PortGroup
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
Instance Method Summary collapse
- #clusters ⇒ Object
-
#initialize(item, vi_client = nil, _check = true) ⇒ PortGroup
constructor
A new instance of PortGroup.
- #network_type ⇒ Object
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) ⇒ PortGroup
Returns a new instance of PortGroup.
379 380 381 382 383 |
# File 'lib/network.rb', line 379 def initialize(item, vi_client = nil, _check = true) check_item(item, RbVmomi::VIM::Network) super(item, vi_client, false) end |
Instance Method Details
#clusters ⇒ Object
385 386 387 388 389 390 391 392 393 394 |
# File 'lib/network.rb', line 385 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_type ⇒ Object
396 397 398 |
# File 'lib/network.rb', line 396 def network_type VCenterDriver::Network::NETWORK_TYPE_PG end |