PaloAltoNetworks / pan-cnc

CNC: Chevy's, not Cadillacs. Rapid UI prototyping for all Palo Alto Networks WWSE demos and pocs.
Apache License 2.0
3 stars 3 forks source link

Need to create template_type of REST #14

Open nembery opened 5 years ago

nembery commented 5 years ago

REST template type is needed for simple bootstrapper integration in cnc

proposed meta-cnc structure:

    template_type: rest
    labels: 
        rest_auth_type: none
        rest_target_path: /generate_bootstrap_package
        rest_operation: post

    snippets:
        - name: bootstrap 
        File: bootstrap_xml
        - Name: init-cfg
        file: init_cfg
        - Name: payload
        file: payload.j2

bootstrapper needs some snippets to be compiled to a string then base64 encoded, this can be handled with jinja2 filter (already implemented)

Requires a new check in ProvisionSnippetView then a new class to prompt for REST endpoint information

nembery commented 5 years ago

first cut is done in rest_action branch, requires more testing though and preferably a good first use base (kibana maybe?)

nembery commented 5 years ago

initial work done in commit: f75e1bca005e92d03a85a4e1138ff7f5b7bb91b9

nembery commented 5 years ago

implemented content-type headers in commit 7ccc711ea0ec1b71c5db201b2571e70fb7bd752a