Skip to content

Conversation

@dineshbaburam91
Copy link
Collaborator

Supporting openconfig

Playbook

  tasks:
    - name: Check open-config configuration
      juniper_junos_config:
        retrieve: 'committed'
        model: "custom"
        filter: "l2vpn"
        remove_ns: False
        namespace: "http://yang.juniper.net/customyang/l2vpn"
        format: "xml"
      register: response

Output

TASK [Print result] *****************************************************************************************************************************
ok: [10.204.49.113] => {
    "response.config_lines": [
        "<l2vpn xmlns=\"http://yang.juniper.net/customyang/l2vpn\">", 
        "    <global>", 
        "        <as-number>65000</as-number>", 
        "        <side>hub</side>", 
        "    </global>", 
        "</l2vpn>", 
        ""
    ]
}


@jnpr-community-netdev
Copy link

Can one of the admins verify this patch?

1 similar comment
@jnpr-community-netdev
Copy link

Can one of the admins verify this patch?

@rsmekala
Copy link
Contributor

rsmekala commented Sep 3, 2019

ok to test

self.fail_json(msg='Unexpected configuration type returned. '
'Configuration is: %s' % (str(config)))
if config.tag != 'configuration-text':
if model is None and config.tag != 'configuration-text':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if we are not able to parse using the given model ??

@rsmekala
Copy link
Contributor

rsmekala commented Sep 5, 2019

retest this please

Copy link
Contributor

@rsmekala rsmekala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Did tests on few combinations. Working as expected.

@rsmekala
Copy link
Contributor

rsmekala commented Sep 5, 2019

retest this please

1 similar comment
@rsmekala
Copy link
Contributor

rsmekala commented Sep 5, 2019

retest this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants