pynos.versions.ver_6.ver_6_0_1 package

Submodules

pynos.versions.ver_6.ver_6_0_1.bgp module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.bgp.BGP(callback)[source]

Bases: pynos.versions.base.bgp.BGP

The BGP class holds all relevent methods and attributes for the BGP capabilities of the NOS device.

None
as4_capability(**kwargs)[source]

Set Spanning Tree state.

Parameters:
  • enabled (bool) – Is AS4 Capability enabled? (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

ValueError – if enabled are invalid.

Examples

>>> import pynos.device
>>> switches = ['10.24.39.211', '10.24.39.203']
>>> auth = ('admin', 'password')
>>> for switch in switches:
...     conn = (switch, '22')
...     with pynos.device.Device(conn=conn, auth=auth) as dev:
...         output = dev.bgp.local_asn(local_as='65535',
...         rbridge_id='225')
...         output = dev.bgp.as4_capability(
...         rbridge_id='225', enabled=True)
...         output = dev.bgp.as4_capability(
...         rbridge_id='225', enabled=False)
get_bgp_neighbors(**kwargs)[source]

Get BGP neighbors configured on a device.

Parameters:
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • vrf (str) – The VRF for this BGP process.
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

List of 0 or more BGP Neighbors on the specified rbridge.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.211', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     result = dev.bgp.get_bgp_neighbors(rbridge_id='225')
...     assert len(result) >= 1
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     delete=True, rbridge_id='225')
...     output = dev.bgp.neighbor(delete=True, rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     dev.bgp.neighbor() 
Traceback (most recent call last):
NotImplementedError
KeyError
graceful_restart(**kwargs)[source]

Set BGP next hop recursion property.

Parameters:
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

AttributeError: When afi is not one of [‘ipv4’, ‘ipv6’]

Examples

>>> import pynos.device
>>> conn = ('10.24.39.212', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.graceful_restart(rbridge_id='226')
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     get=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     delete=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv6')
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv6', get=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv6', delete=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv5') 
Traceback (most recent call last):
AttributeError
local_asn(**kwargs)[source]

Set BGP local ASN.

Parameters:
  • local_as (str) – Local ASN of NOS deice.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

KeyError – if local_as is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     dev.bgp.local_asn() 
Traceback (most recent call last):
KeyError
max_paths(**kwargs)[source]

Set BGP max paths property.

Parameters:
  • vrf (str) – The VRF for this BGP process.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • paths (str) – Number of paths for BGP ECMP (default: 8).
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

AttributeError: When afi is not one of [‘ipv4’, ‘ipv6’]

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.max_paths(paths='8',
...     rbridge_id='225')
...     output = dev.bgp.max_paths(paths='8',
...     rbridge_id='225', get=True)
...     output = dev.bgp.max_paths(paths='8',
...     rbridge_id='225', delete=True)
...     output = dev.bgp.max_paths(paths='8', afi='ipv6',
...     rbridge_id='225')
...     output = dev.bgp.max_paths(paths='8', afi='ipv6',
...     rbridge_id='225', get=True)
...     output = dev.bgp.max_paths(paths='8', afi='ipv6',
...     rbridge_id='225', delete=True)
...     output = dev.bgp.max_paths(paths='8', afi='ipv5',
...     rbridge_id='225') 
Traceback (most recent call last):
AttributeError
neighbor(**kwargs)[source]

Add BGP neighbor.

Parameters:
  • ip_addr (str) – IP Address of BGP neighbor.
  • remote_as (str) – Remote ASN of BGP neighbor.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • delete (bool) – Deletes the neighbor if delete is True.
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
# Returns:
Return value of callback.
Raises:KeyError – if remote_as or ip_addr is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     delete=True, rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     delete=True)
...     dev.bgp.neighbor() 
Traceback (most recent call last):
KeyError
neighbor_password(**kwargs)[source]

Add BGP neighbor.

Parameters:
  • ip_addr (str) – IP Address of BGP neighbor.
  • remote_as (str) – Remote ASN of BGP neighbor.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • password (str) – Password to be used between the peers for MD5
  • authentication
  • delete (bool) – Deletes the neighbor if delete is True.
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
# Returns:
Return value of callback.
Raises:KeyError – if remote_as or ip_addr is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225')
...     output = dev.bgp.neighbor_password(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225', password='test')
...     output = dev.bgp.neighbor_password(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225', password='test',
...     delete=True)
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     output = dev.bgp.neighbor_password(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     password='test')
...     output = dev.bgp.neighbor_password(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     delete=True)
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     delete=True, rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     delete=True)
...     dev.bgp.neighbor() 
Traceback (most recent call last):
KeyError
recursion(**kwargs)[source]

Set BGP next hop recursion property.

Parameters:
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be afi configured in a VCS fabric.
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

AttributeError: When afi is not one of [‘ipv4’, ‘ipv6’]

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.recursion(rbridge_id='225')
...     output = dev.bgp.recursion(rbridge_id='225', get=True)
...     output = dev.bgp.recursion(rbridge_id='225', delete=True)
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv6')
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv6',
...     get=True)
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv6',
...     delete=True)
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv5')
...     
Traceback (most recent call last):
AttributeError
redistribute(**kwargs)[source]

Set BGP redistribute properties.

Parameters:
  • vrf (str) – The VRF for this BGP process.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • source (str) – Source for redistributing. (connected)
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

KeyError – if source is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.redistribute(source='connected',
...     rbridge_id='225')
...     output = dev.bgp.redistribute(source='connected',
...     rbridge_id='225', get=True)
...     output = dev.bgp.redistribute(source='connected',
...     rbridge_id='225', delete=True)
...     dev.bgp.redistribute() 
Traceback (most recent call last):
KeyError
...     dev.bgp.redistribute(source='connected', rbridge_id='225',
...     afi='hodor') 
Traceback (most recent call last):
AttributeError
...     dev.bgp.redistribute(source='hodor', rbridge_id='225',
...     afi='ipv4') 
Traceback (most recent call last):
AttributeError
remove_bgp(**kwargs)[source]

Remove BGP process completely.

Parameters:
  • vrf (str) – The VRF for this BGP process.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

None

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.remove_bgp(rbridge_id='225')

pynos.versions.ver_6.ver_6_0_1.fabric_service module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.bgp.BGP(callback)[source]

Bases: pynos.versions.base.bgp.BGP

The BGP class holds all relevent methods and attributes for the BGP capabilities of the NOS device.

None
as4_capability(**kwargs)[source]

Set Spanning Tree state.

Parameters:
  • enabled (bool) – Is AS4 Capability enabled? (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

ValueError – if enabled are invalid.

Examples

>>> import pynos.device
>>> switches = ['10.24.39.211', '10.24.39.203']
>>> auth = ('admin', 'password')
>>> for switch in switches:
...     conn = (switch, '22')
...     with pynos.device.Device(conn=conn, auth=auth) as dev:
...         output = dev.bgp.local_asn(local_as='65535',
...         rbridge_id='225')
...         output = dev.bgp.as4_capability(
...         rbridge_id='225', enabled=True)
...         output = dev.bgp.as4_capability(
...         rbridge_id='225', enabled=False)
get_bgp_neighbors(**kwargs)[source]

Get BGP neighbors configured on a device.

Parameters:
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • vrf (str) – The VRF for this BGP process.
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

List of 0 or more BGP Neighbors on the specified rbridge.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.211', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     result = dev.bgp.get_bgp_neighbors(rbridge_id='225')
...     assert len(result) >= 1
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     delete=True, rbridge_id='225')
...     output = dev.bgp.neighbor(delete=True, rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     dev.bgp.neighbor() 
Traceback (most recent call last):
NotImplementedError
KeyError
graceful_restart(**kwargs)[source]

Set BGP next hop recursion property.

Parameters:
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

AttributeError: When afi is not one of [‘ipv4’, ‘ipv6’]

Examples

>>> import pynos.device
>>> conn = ('10.24.39.212', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.graceful_restart(rbridge_id='226')
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     get=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     delete=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv6')
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv6', get=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv6', delete=True)
...     output = dev.bgp.graceful_restart(rbridge_id='226',
...     afi='ipv5') 
Traceback (most recent call last):
AttributeError
local_asn(**kwargs)[source]

Set BGP local ASN.

Parameters:
  • local_as (str) – Local ASN of NOS deice.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

KeyError – if local_as is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     dev.bgp.local_asn() 
Traceback (most recent call last):
KeyError
max_paths(**kwargs)[source]

Set BGP max paths property.

Parameters:
  • vrf (str) – The VRF for this BGP process.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • paths (str) – Number of paths for BGP ECMP (default: 8).
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

AttributeError: When afi is not one of [‘ipv4’, ‘ipv6’]

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.max_paths(paths='8',
...     rbridge_id='225')
...     output = dev.bgp.max_paths(paths='8',
...     rbridge_id='225', get=True)
...     output = dev.bgp.max_paths(paths='8',
...     rbridge_id='225', delete=True)
...     output = dev.bgp.max_paths(paths='8', afi='ipv6',
...     rbridge_id='225')
...     output = dev.bgp.max_paths(paths='8', afi='ipv6',
...     rbridge_id='225', get=True)
...     output = dev.bgp.max_paths(paths='8', afi='ipv6',
...     rbridge_id='225', delete=True)
...     output = dev.bgp.max_paths(paths='8', afi='ipv5',
...     rbridge_id='225') 
Traceback (most recent call last):
AttributeError
neighbor(**kwargs)[source]

Add BGP neighbor.

Parameters:
  • ip_addr (str) – IP Address of BGP neighbor.
  • remote_as (str) – Remote ASN of BGP neighbor.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • delete (bool) – Deletes the neighbor if delete is True.
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
# Returns:
Return value of callback.
Raises:KeyError – if remote_as or ip_addr is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     delete=True, rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     delete=True)
...     dev.bgp.neighbor() 
Traceback (most recent call last):
KeyError
neighbor_password(**kwargs)[source]

Add BGP neighbor.

Parameters:
  • ip_addr (str) – IP Address of BGP neighbor.
  • remote_as (str) – Remote ASN of BGP neighbor.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • password (str) – Password to be used between the peers for MD5
  • authentication
  • delete (bool) – Deletes the neighbor if delete is True.
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
# Returns:
Return value of callback.
Raises:KeyError – if remote_as or ip_addr is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225')
...     output = dev.bgp.neighbor_password(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225', password='test')
...     output = dev.bgp.neighbor_password(ip_addr='10.10.10.10',
...     remote_as='65535', rbridge_id='225', password='test',
...     delete=True)
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1')
...     output = dev.bgp.neighbor_password(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     password='test')
...     output = dev.bgp.neighbor_password(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     delete=True)
...     output = dev.bgp.neighbor(ip_addr='10.10.10.10',
...     delete=True, rbridge_id='225')
...     output = dev.bgp.neighbor(remote_as='65535',
...     rbridge_id='225',
...     ip_addr='2001:4818:f000:1ab:cafe:beef:1000:1',
...     delete=True)
...     dev.bgp.neighbor() 
Traceback (most recent call last):
KeyError
recursion(**kwargs)[source]

Set BGP next hop recursion property.

Parameters:
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be afi configured in a VCS fabric.
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

AttributeError: When afi is not one of [‘ipv4’, ‘ipv6’]

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.recursion(rbridge_id='225')
...     output = dev.bgp.recursion(rbridge_id='225', get=True)
...     output = dev.bgp.recursion(rbridge_id='225', delete=True)
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv6')
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv6',
...     get=True)
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv6',
...     delete=True)
...     output = dev.bgp.max_paths(rbridge_id='225', afi='ipv5')
...     
Traceback (most recent call last):
AttributeError
redistribute(**kwargs)[source]

Set BGP redistribute properties.

Parameters:
  • vrf (str) – The VRF for this BGP process.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • source (str) – Source for redistributing. (connected)
  • afi (str) – Address family to configure. (ipv4, ipv6)
  • get (bool) – Get config instead of editing config. (True, False)
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

KeyError – if source is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.redistribute(source='connected',
...     rbridge_id='225')
...     output = dev.bgp.redistribute(source='connected',
...     rbridge_id='225', get=True)
...     output = dev.bgp.redistribute(source='connected',
...     rbridge_id='225', delete=True)
...     dev.bgp.redistribute() 
Traceback (most recent call last):
KeyError
...     dev.bgp.redistribute(source='connected', rbridge_id='225',
...     afi='hodor') 
Traceback (most recent call last):
AttributeError
...     dev.bgp.redistribute(source='hodor', rbridge_id='225',
...     afi='ipv4') 
Traceback (most recent call last):
AttributeError
remove_bgp(**kwargs)[source]

Remove BGP process completely.

Parameters:
  • vrf (str) – The VRF for this BGP process.
  • rbridge_id (str) – The rbridge ID of the device on which BGP will be configured in a VCS fabric.
  • callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:

Return value of callback.

Raises:

None

Examples

>>> import pynos.device
>>> conn = ('10.24.39.203', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.bgp.local_asn(local_as='65535',
...     rbridge_id='225')
...     output = dev.bgp.remove_bgp(rbridge_id='225')

pynos.versions.ver_6.ver_6_0_1.firmware module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.firmware.Firmware(callback)[source]

Bases: pynos.versions.base.firmware.Firmware

System class containing all system level methods and attributes.

pynos.versions.ver_6.ver_6_0_1.interface module

Copyright 2015 Brocade Communications Systems, Inc. Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.interface.Interface(callback)[source]

Bases: pynos.versions.base.interface.Interface

The Interface class holds all the actions assocaiated with the Interfaces of a NOS device. .. attribute:: None

mac_move_detect_enable(**kwargs)[source]

Enable mac move detect enable on vdx switches :param get: Get config instead of editing config. (True, False) :type get: bool :param delete: True, delete the mac-move-detect-enable.

(True, False)
Parameters:callback (function) – A function executed upon completion of the method. The only parameter passed to callback will be the ElementTree config.
Returns:Return value of callback.
Raises:None

Examples

>>> import pynos.device
>>> conn = ('10.24.39.211', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.interface.mac_move_detect_enable()
...     output = dev.interface.mac_move_detect_enable(get=True)
...     output = dev.interface.mac_move_detect_enable(delete=True)
mac_move_limit(**kwargs)[source]

Configure mac move limit on vdx switches :param mac_move_limit: set the limit of mac move limit :param get: Get config instead of editing config. (True, False) :type get: bool :param delete: True, delete the mac move limit.(True, False) :type delete: bool :param callback: A function executed upon completion of the

method. The only parameter passed to callback will be the ElementTree config.
Returns:Return value of callback.
Raises:None

Examples

>>> import pynos.device
>>> conn = ('10.24.39.211', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.interface.mac_move_limit()
...     output = dev.interface.mac_move_limit(get=True)
...     output = dev.interface.mac_move_limit(delete=True)

pynos.versions.ver_6.ver_6_0_1.lldp module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.lldp.LLDP(callback)[source]

Bases: pynos.versions.base.lldp.LLDP

LLDP class containing LLDP methods and attributes.

pynos.versions.ver_6.ver_6_0_1.services module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.services.Services(callback)[source]

Bases: pynos.versions.base.services.Services

Services class containing methods for manipulating services.

pynos.versions.ver_6.ver_6_0_1.snmp module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.snmp.SNMP(callback)[source]

Bases: pynos.versions.base.snmp.SNMP

SNMP class containing all system level methods and attributes.

pynos.versions.ver_6.ver_6_0_1.system module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.system.System(callback)[source]

Bases: pynos.versions.base.system.System

System class containing all system level methods and attributes.

pynos.versions.ver_6.ver_6_0_1.vcs module

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class pynos.versions.ver_6.ver_6_0_1.vcs.VCS(callback)[source]

Bases: pynos.versions.base.vcs.VCS

VCS class containing all VCS methods and attributes.

Module contents

Copyright 2015 Brocade Communications Systems, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.