0

Using Textfsm I am attempting to get the output for :

Name: Valid from: Valid to:

I think the problem is the location in my template to search after == [ Fortinet_CA_SSL ] but would love some help.

Output:

== [ Fortinet_CA_SSL ]
        Name:        Fortinet_CA_SSL
        Subject:     C = US, ST = California, L = Sunnyvale, O = Fortinet, OU = Certificate Authority, CN = FG200D3913804332, emailAddress = support@fortinet.com
        Issuer:      C = US, ST = California, L = Sunnyvale, O = Fortinet, OU = Certificate Authority, CN = FG200D3913804332, emailAddress = support@fortinet.com
        Valid from:  2018-02-08 16:43:27  GMT
        Valid to:    2028-02-09 16:43:27  GMT
        Fingerprint: 78:DA:31:59:9D:A6:D7:98:79:51:1F:EE:0E:C0:C6:45
        Serial Num:  25:4d:55:ca:b8:e6:b5:54

Template:

Value Name (\S*)
Value Valid_from (\S*)
Value Valid_to (\S*)

Start
  ^Name: ${Name}
  ^Valid from: ${Valid_from}
  ^Valid to: ${Valid_to}

1 Answers1

0

Got it:

Template:

Value Name (\S*)
Value Valid_from (\S*)
Value Valid_to (\S*)

Start
  ^\tName:        ${Name}
  ^\tValid from:  ${Valid_from}
  ^\tValid to:    ${Valid_to}