Class: Junos::Ez::L2ports::Provider
- Inherits:
-
Provider::Parent
- Object
- Provider::Parent
- Junos::Ez::L2ports::Provider
- Defined in:
- lib/junos-ez/l2_ports.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Provider::Parent
#catalog, #has, #list, #name, #ndev, #parent, #properties, #providers, #should
Instance Method Summary collapse
-
#is_trunk? ⇒ Boolean
common parenting …
- #mode_changed? ⇒ Boolean
- #should_trunk? ⇒ Boolean
Methods inherited from Provider::Parent
#[], #[]=, #activate!, #active?, #catalog!, #create, #create!, #create_from_hash!, #create_from_yaml!, #deactivate!, #delete!, #each, #exists?, #init_has, #initialize, #is_new?, #is_provider?, #list!, #name_decorated, #need_write?, #read!, #rename!, #reorder!, #select, #to_h, #to_h_expanded, #to_yaml, #with, #write!, #xml_at_edit, #xml_at_top, #xml_build_change, #xml_change__active, #xml_change__exist, #xml_change_admin, #xml_change_description, #xml_config_read!, #xml_element_newname, #xml_get_has_xml, #xml_on_create, #xml_on_delete
Constructor Details
This class inherits a constructor from Junos::Ez::Provider::Parent
Instance Method Details
#is_trunk? ⇒ Boolean
common parenting …
33 34 35 |
# File 'lib/junos-ez/l2_ports.rb', line 33 def is_trunk? @has[:vlan_tagging] == true end |
#mode_changed? ⇒ Boolean
41 42 43 44 45 |
# File 'lib/junos-ez/l2_ports.rb', line 41 def mode_changed? return true if is_new? return false if @should[:vlan_tagging].nil? @should[:vlan_tagging] != @has[:vlan_tagging] end |
#should_trunk? ⇒ Boolean
37 38 39 |
# File 'lib/junos-ez/l2_ports.rb', line 37 def should_trunk? (@should[:vlan_tagging].nil?) ? @has[:vlan_tagging] : @should[:vlan_tagging] end |