Class: Construqt::Flavour::Ciscian::Hp2510g::TrunkVerb

Inherits:
PatternBasedVerb show all
Defined in:
lib/construqt/flavour/ciscian/dialect_hp-2510g.rb

Instance Attribute Summary

Attributes inherited from PatternBasedVerb

#changes, #section

Class Method Summary collapse

Methods inherited from PatternBasedVerb

#add, #always_select_empty_pattern, compare, #determine_output_patterns, extract_varname, #find_key_var, find_variables, #group?, #initialize, #integrate, invert, is_key_value?, is_value?, #keys_of_set, matches, parse_line, #serialize, variables, #yes

Constructor Details

This class inherits a constructor from Construqt::Flavour::Ciscian::PatternBasedVerb

Class Method Details

.find_regex(variable) ⇒ Object



158
159
160
161
162
# File 'lib/construqt/flavour/ciscian/dialect_hp-2510g.rb', line 158

def self.find_regex(variable)
  {
    "mode" => "(Trunk|LACP)"
  }[variable]
end

.patternsObject



164
165
166
# File 'lib/construqt/flavour/ciscian/dialect_hp-2510g.rb', line 164

def self.patterns
  ["no trunk {-ports}", "trunk {+ports} Trk{*channel} {=mode}"]
end

.sectionObject



154
155
156
# File 'lib/construqt/flavour/ciscian/dialect_hp-2510g.rb', line 154

def self.section
  "trunk"
end