Skip to content

Commit

Permalink
"version 1.0.53"
Browse files Browse the repository at this point in the history
  • Loading branch information
VERNAY committed May 13, 2020
1 parent 6637a06 commit 6d42da9
Show file tree
Hide file tree
Showing 4,867 changed files with 519,156 additions and 1,093,051 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes

### May 2020
* 1.0.53
* fixed translation of python class property names to rest api property names
* added update method to Multivalue.Steps class

### Apr 2020
* 1.0.52
* classes generated from IxNetwork build 9.00.1915.16
Expand Down
9 changes: 8 additions & 1 deletion ixnetwork_restpy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def _build_payload(self, locals_dict, method_name=None):
if method_name is not None:
attribute_name = key
else:
attribute_name = '%s%s' % (key[0].lower(), key[1:])
attribute_name = key
payload_value = self._build_value(key, value, method_name=python_method_name)
if payload_value is not None:
payload[attribute_name] = payload_value
Expand Down Expand Up @@ -445,6 +445,13 @@ def _get_ngpf_device_ids(self, locals_dict=dict()):

return [x for x in device_ids if x != 0]

def _map_locals(self, sdm_att_map, locals_dict):
mapped_dict = {}
for key in locals_dict.keys():
if key in sdm_att_map.keys():
mapped_dict[sdm_att_map[key]] = locals_dict[key]
return mapped_dict

def info(self, message):
"""Add an INFO level message to the logger handlers
Expand Down
3 changes: 2 additions & 1 deletion ixnetwork_restpy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def __init__(self, hostname, rest_port, platform, log_file_name=None, ignore_env
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
self._headers = {
Connection.X_API_KEY: None,
'User-Agent': 'ixnetwork-restpy'
'User-Agent': 'ixnetwork-restpy',
'Connection': 'keep-alive'
}
if script_watch is False:
self._headers['SDMAPI'] = 'GUIREQUEST'
Expand Down
23 changes: 15 additions & 8 deletions ixnetwork_restpy/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class Steps(Base):
"""List of all possible steps for this multivalue
"""
_SDM_NAME = 'nest'
_SDM_ATT_MAP = {
'Enabled': 'enabled',
'Step': 'step',
'Owner': 'owner',
'Description': 'description'
}

def __init__(self, parent):
super(Steps, self).__init__(parent)
Expand All @@ -38,7 +44,7 @@ def Description(self):
-------
- str: The description of the step
"""
return self._get_attribute('description')
return self._get_attribute(self._SDM_ATT_MAP['Description'])

@property
def Owner(self):
Expand All @@ -48,7 +54,7 @@ def Owner(self):
-------
- str: The href of the owner
"""
return self._get_attribute('owner')
return self._get_attribute(self._SDM_ATT_MAP['Owner'])

@property
def Enabled(self):
Expand All @@ -58,11 +64,10 @@ def Enabled(self):
-------
- bool: Enable the step or disable the step
"""
return self._get_attribute('enabled')

return self._get_attribute(self._SDM_ATT_MAP['Enabled'])
@Enabled.setter
def Enabled(self, enabled):
self._set_attribute('enabled', enabled)
self._set_attribute(self._SDM_ATT_MAP['Enabled'], enabled)

@property
def Step(self):
Expand All @@ -72,11 +77,13 @@ def Step(self):
-------
- str: The value of the step
"""
return self._get_attribute('step')

return self._get_attribute(self._SDM_ATT_MAP['Step'])
@Step.setter
def Step(self, value):
self._set_attribute('step', value)
self._set_attribute(self._SDM_ATT_MAP['Step'], value)

def update(self, Enabled=None, Step=None):
return self._update(self._map_locals(self._SDM_ATT_MAP, locals()))

def find(self, Description=None):
"""Finds and retrieves multivalue step resources from the server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ class AvailableHardware(Base):

__slots__ = ()
_SDM_NAME = 'availableHardware'
_SDM_ATT_MAP = {
'IsLocked': 'isLocked',
'IsOffChassis': 'isOffChassis',
'OffChassisHwM': 'offChassisHwM',
}

def __init__(self, parent):
super(AvailableHardware, self).__init__(parent)
Expand Down Expand Up @@ -69,7 +74,7 @@ def IsLocked(self):
-------
- bool: If true, locks the Hardware Manager.
"""
return self._get_attribute('isLocked')
return self._get_attribute(self._SDM_ATT_MAP['IsLocked'])

@property
def IsOffChassis(self):
Expand All @@ -78,10 +83,10 @@ def IsOffChassis(self):
-------
- bool: If true, the Hardware Manager is Off Chassis.
"""
return self._get_attribute('isOffChassis')
return self._get_attribute(self._SDM_ATT_MAP['IsOffChassis'])
@IsOffChassis.setter
def IsOffChassis(self, value):
self._set_attribute('isOffChassis', value)
self._set_attribute(self._SDM_ATT_MAP['IsOffChassis'], value)

@property
def OffChassisHwM(self):
Expand All @@ -90,10 +95,10 @@ def OffChassisHwM(self):
-------
- str: Enables the Off Chassis Hardware Manager. The Hardware Manager is an IxOS component that manages the resources on an Ixia chassis. IxNetwork communicates with a chassis through Hardware Manager. Normally, Hardware Manager runs on the chassis itself; however, it can also be installed and run on a separate PC. This configuration is known as an Off-Chassis Hardware Manager.
"""
return self._get_attribute('offChassisHwM')
return self._get_attribute(self._SDM_ATT_MAP['OffChassisHwM'])
@OffChassisHwM.setter
def OffChassisHwM(self, value):
self._set_attribute('offChassisHwM', value)
self._set_attribute(self._SDM_ATT_MAP['OffChassisHwM'], value)

def update(self, IsOffChassis=None, OffChassisHwM=None):
"""Updates availableHardware resource on the server.
Expand All @@ -107,4 +112,4 @@ def update(self, IsOffChassis=None, OffChassisHwM=None):
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._update(locals())
return self._update(self._map_locals(self._SDM_ATT_MAP, locals()))
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ class Aggregation(Base):

__slots__ = ()
_SDM_NAME = 'aggregation'
_SDM_ATT_MAP = {
'ActivePort': 'activePort',
'ActivePorts': 'activePorts',
'AvailableModes': 'availableModes',
'Mode': 'mode',
'ResourcePorts': 'resourcePorts',
}

def __init__(self, parent):
super(Aggregation, self).__init__(parent)
Expand All @@ -42,7 +49,7 @@ def ActivePort(self):
-------
- str(None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port): Deprecated. Use activePorts instead.
"""
return self._get_attribute('activePort')
return self._get_attribute(self._SDM_ATT_MAP['ActivePort'])

@property
def ActivePorts(self):
Expand All @@ -51,7 +58,7 @@ def ActivePorts(self):
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port]): All active ports from Resource Group.
"""
return self._get_attribute('activePorts')
return self._get_attribute(self._SDM_ATT_MAP['ActivePorts'])

@property
def AvailableModes(self):
Expand All @@ -60,7 +67,7 @@ def AvailableModes(self):
-------
- list(str[normal | tenGig | fortyGig | singleMode | dualMode | hundredGigNonFanOut | fortyGigFanOut | threeByTenGigFanOut | eightByTenGigFanOut | fourByTwentyFiveGigNonFanOut | twoByTwentyFiveGigNonFanOut | oneByFiftyGigNonFanOut | fortyGigNonFanOut | oneByTenGigFanOut | fourByTenGigFanOut | incompatibleMode | hundredGigCapturePlayback | fortyGigCapturePlayback | novusHundredGigNonFanOut | novusFourByTwentyFiveGigNonFanOut | novusTwoByFiftyGigNonFanOut | novusOneByFortyGigNonFanOut | novusFourByTenGigNonFanOut | krakenOneByFourHundredGigNonFanOut | krakenOneByTwoHundredGigNonFanOut | krakenTwoByOneHundredGigFanOut | krakenFourByFiftyGigFanOut | aresOneOneByFourHundredGigNonFanOut | aresOneTwoByTwoHundredGigFanOut | aresOneFourByOneHundredGigFanOut | aresOneEightByFiftyGigFanOut]): Gets the supported resource group modes.
"""
return self._get_attribute('availableModes')
return self._get_attribute(self._SDM_ATT_MAP['AvailableModes'])

@property
def Mode(self):
Expand All @@ -69,10 +76,10 @@ def Mode(self):
-------
- str(normal | tenGig | fortyGig | singleMode | dualMode | hundredGigNonFanOut | fortyGigFanOut | threeByTenGigFanOut | eightByTenGigFanOut | fourByTwentyFiveGigNonFanOut | twoByTwentyFiveGigNonFanOut | oneByFiftyGigNonFanOut | fortyGigNonFanOut | oneByTenGigFanOut | fourByTenGigFanOut | incompatibleMode | hundredGigCapturePlayback | fortyGigCapturePlayback | novusHundredGigNonFanOut | novusFourByTwentyFiveGigNonFanOut | novusTwoByFiftyGigNonFanOut | novusOneByFortyGigNonFanOut | novusFourByTenGigNonFanOut | krakenOneByFourHundredGigNonFanOut | krakenOneByTwoHundredGigNonFanOut | krakenTwoByOneHundredGigFanOut | krakenFourByFiftyGigFanOut | aresOneOneByFourHundredGigNonFanOut | aresOneTwoByTwoHundredGigFanOut | aresOneFourByOneHundredGigFanOut | aresOneEightByFiftyGigFanOut): Resource Group mode.
"""
return self._get_attribute('mode')
return self._get_attribute(self._SDM_ATT_MAP['Mode'])
@Mode.setter
def Mode(self, value):
self._set_attribute('mode', value)
self._set_attribute(self._SDM_ATT_MAP['Mode'], value)

@property
def ResourcePorts(self):
Expand All @@ -81,7 +88,7 @@ def ResourcePorts(self):
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port]): All ports from Resource Group.
"""
return self._get_attribute('resourcePorts')
return self._get_attribute(self._SDM_ATT_MAP['ResourcePorts'])

def update(self, Mode=None):
"""Updates aggregation resource on the server.
Expand All @@ -94,7 +101,7 @@ def update(self, Mode=None):
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._update(locals())
return self._update(self._map_locals(self._SDM_ATT_MAP, locals()))

def find(self, ActivePort=None, ActivePorts=None, AvailableModes=None, Mode=None, ResourcePorts=None):
"""Finds and retrieves aggregation resources from the server.
Expand All @@ -119,7 +126,7 @@ def find(self, ActivePort=None, ActivePorts=None, AvailableModes=None, Mode=None
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._select(locals())
return self._select(self._map_locals(self._SDM_ATT_MAP, locals()))

def read(self, href):
"""Retrieves a single instance of aggregation data from the server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ class Card(Base):

__slots__ = ()
_SDM_NAME = 'card'
_SDM_ATT_MAP = {
'AggregationMode': 'aggregationMode',
'AggregationSupported': 'aggregationSupported',
'AvailableModes': 'availableModes',
'CardId': 'cardId',
'Description': 'description',
}

def __init__(self, parent):
super(Card, self).__init__(parent)
Expand Down Expand Up @@ -70,10 +77,10 @@ def AggregationMode(self):
-------
- str(notSupported | mixed | normal | tenGigAggregation | fortyGigAggregation | singleMode | dualMode | hundredGigNonFanOut | fortyGigFanOut | threeByTenGigFanOut | eightByTenGigFanOut | fourByTwentyFiveGigNonFanOut | twoByTwentyFiveGigNonFanOut | oneByFiftyGigNonFanOut | fortyGigNonFanOut | oneByTenGigFanOut | fourByTenGigFanOut | incompatibleMode | hundredGigCapturePlayback | fortyGigCapturePlayback | novusHundredGigNonFanOut | novusFourByTwentyFiveGigNonFanOut | novusTwoByFiftyGigNonFanOut | novusOneByFortyGigNonFanOut | novusFourByTenGigNonFanOut | krakenOneByFourHundredGigNonFanOut | krakenOneByTwoHundredGigNonFanOut | krakenTwoByOneHundredGigFanOut | krakenFourByFiftyGigFanOut | aresOneOneByFourHundredGigNonFanOut | aresOneTwoByTwoHundredGigFanOut | aresOneFourByOneHundredGigFanOut | aresOneEightByFiftyGigFanOut): Gets or sets the aggregation mode.
"""
return self._get_attribute('aggregationMode')
return self._get_attribute(self._SDM_ATT_MAP['AggregationMode'])
@AggregationMode.setter
def AggregationMode(self, value):
self._set_attribute('aggregationMode', value)
self._set_attribute(self._SDM_ATT_MAP['AggregationMode'], value)

@property
def AggregationSupported(self):
Expand All @@ -82,7 +89,7 @@ def AggregationSupported(self):
-------
- bool: (read only) If true, indicates that the card is operating in resource group mode and not in normal mode
"""
return self._get_attribute('aggregationSupported')
return self._get_attribute(self._SDM_ATT_MAP['AggregationSupported'])

@property
def AvailableModes(self):
Expand All @@ -91,7 +98,7 @@ def AvailableModes(self):
-------
- list(str[notSupported | mixed | normal | tenGigAggregation | fortyGigAggregation | singleMode | dualMode | hundredGigNonFanOut | fortyGigFanOut | threeByTenGigFanOut | eightByTenGigFanOut | fourByTwentyFiveGigNonFanOut | twoByTwentyFiveGigNonFanOut | oneByFiftyGigNonFanOut | fortyGigNonFanOut | oneByTenGigFanOut | fourByTenGigFanOut | incompatibleMode | hundredGigCapturePlayback | fortyGigCapturePlayback | novusHundredGigNonFanOut | novusFourByTwentyFiveGigNonFanOut | novusTwoByFiftyGigNonFanOut | novusOneByFortyGigNonFanOut | novusFourByTenGigNonFanOut | krakenOneByFourHundredGigNonFanOut | krakenOneByTwoHundredGigNonFanOut | krakenTwoByOneHundredGigFanOut | krakenFourByFiftyGigFanOut | aresOneOneByFourHundredGigNonFanOut | aresOneTwoByTwoHundredGigFanOut | aresOneFourByOneHundredGigFanOut | aresOneEightByFiftyGigFanOut]): Gets the supported port resource group modes on the card.
"""
return self._get_attribute('availableModes')
return self._get_attribute(self._SDM_ATT_MAP['AvailableModes'])

@property
def CardId(self):
Expand All @@ -100,7 +107,7 @@ def CardId(self):
-------
- number: Identifier for the card on the chassis.
"""
return self._get_attribute('cardId')
return self._get_attribute(self._SDM_ATT_MAP['CardId'])

@property
def Description(self):
Expand All @@ -109,7 +116,7 @@ def Description(self):
-------
- str: Description of the card.
"""
return self._get_attribute('description')
return self._get_attribute(self._SDM_ATT_MAP['Description'])

def update(self, AggregationMode=None):
"""Updates card resource on the server.
Expand All @@ -122,7 +129,7 @@ def update(self, AggregationMode=None):
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._update(locals())
return self._update(self._map_locals(self._SDM_ATT_MAP, locals()))

def find(self, AggregationMode=None, AggregationSupported=None, AvailableModes=None, CardId=None, Description=None):
"""Finds and retrieves card resources from the server.
Expand All @@ -147,7 +154,7 @@ def find(self, AggregationMode=None, AggregationSupported=None, AvailableModes=N
------
- ServerError: The server has encountered an uncategorized error condition
"""
return self._select(locals())
return self._select(self._map_locals(self._SDM_ATT_MAP, locals()))

def read(self, href):
"""Retrieves a single instance of card data from the server.
Expand Down
Loading

0 comments on commit 6d42da9

Please sign in to comment.