napalm-automation / napalm-junos

Apache License 2.0
22 stars 42 forks source link

support global commands in get_bgp_config() #221

Closed ckishimo closed 7 years ago

ckishimo commented 7 years ago

This provides support for BGP commands applied globally as they are currently ignored. Now, I don't know how to return this data, I just included a new key called GLOBAL, but not sure if there is a better approach

{
    "GLOBAL": {
        "apply_groups": [], 
        "description": "", 
        "export_policy": "p1", 
        "import_policy": "p2", 
        "local_address": "", 
        "local_as": 1111, 
        "multihop_ttl": 64, 
        "prefix_limit": {}, 
        "remove_private_as": true
    }, 
    "internal": {
        "apply_groups": [], 
        "cluster": null, 
        "description": "", 

This is breaking the tests using the mocked data.... but before fixing that it would be good to know if this PR is approved or not. Thanks

dbarrosop commented 7 years ago

First step to modify an existing method data structure is to open an issue/PR in napalm-base to discuss the topic. However, as we are going to go into a code freeze soon for the "reunification" process I'd suggest discussing this after it's complete.

ckishimo commented 7 years ago

@dbarrosop: thanks, we can discuss that once the "reunificaiton" is over. Closing