Add system method to Quasar model and update TTP template
- Implemented a new `system` method in the `Quasar` model to extract and format system information, including version handling. - Updated the TTP template to adjust the grouping and ignore patterns for better parsing of system details, ensuring compatibility with the new method.
This commit is contained in:
@@ -46,16 +46,20 @@ default_system = {
|
||||
</vars>
|
||||
|
||||
<group name="system" default="default_system">
|
||||
# Engine {{ version }}
|
||||
# Product Name {{ model }}
|
||||
# Product Serial Number {{ serial_number }}
|
||||
#{{ ignore("\s+Assembly\s+") }}{{ assembly_version }}
|
||||
#{{ ignore("\s+Product Name\s+") }}{{ model | ORPHRASE }}
|
||||
#{{ ignore("\s+Product Serial Number\s+") }}{{ serial_number }}
|
||||
</group>
|
||||
|
||||
<group name="system" default="default_system">
|
||||
#{{ ignore("\s+Engine\s+") }}{{ engine_version }}
|
||||
#{{ ignore("\s+Product Name\s+") }}{{ model | ORPHRASE }}
|
||||
#{{ ignore("\s+Product Serial Number\s+") }}{{ serial_number }}
|
||||
</group>
|
||||
<group name="interfaces">
|
||||
{{ ignore("\\s*") }}config {{ interface }} ipv4 address {{ ip_address }}/{{ mask }} gateway {{ gateway }} {{ ignore }}
|
||||
</group>
|
||||
|
||||
<group name="bulkinterfaces.{{ interface }}">
|
||||
{{ ignore("\\s*") }}config interface {{ interface | _start_ }} fec none mode force-up enable
|
||||
{{ ignore("\\s*") }}config interface {{ interface | _start_ }} description {{ description | ORPHRASE | strip('"')}}
|
||||
</group>
|
||||
Reference in New Issue
Block a user