sec0uth / brick-abode-project-interview

The final project of interviewing process
0 stars 0 forks source link

Configuration file #11

Closed sec0uth closed 3 years ago

sec0uth commented 3 years ago

Branch yml-config-#11

Specification of main configuration file.

# logging
logging:
  verbose: true
  console: true
  file: /path/to/log/output

# connection settings
ssh:
  config: ~/.ssh/config
  host: router
  passwd: h4ckme
  # ask_passwd: true

# configure changes in device
changes:
  banner: "!!!!! This is the new awesome banner !!!!!"
  # banner_file: /path/to/banner/works/too

  user:
    name: little-juno
    passwd: imdumb
    # class: super-user

  config: |
         set system foo bar
         set system policy drop
  # config_file: /path/to/config/works/too

Logging

SSH

Changes

Advanced

Mutually exclusive

SSH

Changes

sec0uth commented 3 years ago

I started with testing first, and to keep it simple, the validation over the configuration file will not be strict. Only required fields are going to be verified, the following fields:

Note: the field at user.passwd is also required, but the application take care of asking when missing

sec0uth commented 3 years ago

Finished juniper.config module: