pynos.versions.ver_7.ver_7_1_0 package

Submodules

pynos.versions.ver_7.ver_7_1_0.system module

Copyright 2016 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_7.ver_7_1_0.system.System(callback)[source]

Bases: pynos.versions.base.system.System

System class containing all system level methods and attributes.

maintenance_mode(**kwargs)[source]

Configures maintenance mode on the device

Parameters:
  • rbridge_id (str) – The rbridge ID of the device on which
  • mode (Maintenance) – 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 rbridge_id is not specified.

Examples

>>> import pynos.device
>>> conn = ('10.24.39.202', '22')
>>> auth = ('admin', 'password')
>>> with pynos.device.Device(conn=conn, auth=auth) as dev:
...     output = dev.system.maintenance_mode(rbridge_id='226')
...     output = dev.system.maintenance_mode(rbridge_id='226',
...     get=True)
...     assert output == True
...     output = dev.system.maintenance_mode(rbridge_id='226',
...     delete=True)
...     output = dev.system.maintenance_mode(rbridge_id='226',
...     get=True)
...     assert output == False

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.