Skip to content

Commit

Permalink
"version 1.0.48"
Browse files Browse the repository at this point in the history
  • Loading branch information
VERNAY committed Jan 3, 2020
1 parent 43c223d commit fc31719
Show file tree
Hide file tree
Showing 222 changed files with 2,998 additions and 55,966 deletions.
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,14 @@ print(StatViewAssistant(ixnetwork, 'Flow Statistics'))
ixnetwork.Traffic.StopStatelessTrafficBlocking()
```

## Supported Server Versions
This client package supports versions 8.52 and up of the following servers:
* Linux IxNetwork API Server
* Windows IxNetwork GUI
* Windows IxNetwork Connection Manager

## Documentation
Documentation is available using the following methods:
Documentation is available using the following methods:
* [Online web based documentation](https://openixia.github.io/ixnetwork_restpy/#/overview)
* [Samples](https://openixia.github.io/ixnetwork_restpy/#/samples)
* [API Reference](https://openixia.github.io/ixnetwork_restpy/#/reference)
Expand All @@ -93,16 +99,19 @@ Documentation is available using the following methods:
```

## Additional Samples
Visit the [OpenIxia ixnetwork-restpy sample site maintained by solution architects](https://github.com/OpenIxia/IxNetwork/tree/master/RestPy) for in depth end-to-end samples that demonstrate the following:
* building a configuration
* from scratch
* from an existing IxNetwork configuration
* running the configuration
* connecting ports to hardware
* starting protocols
* starting traffic
* getting statistics
* port stats
* traffic stats


Visit the [OpenIxia ixnetwork-restpy sample site maintained by solution architects](https://github.com/OpenIxia/IxNetwork/tree/master/RestPy) for in-depth end-to-end samples that demonstrate the following:
* building a configuration
* from scratch
* from an existing IxNetwork configuration
* running the configuration
* connecting ports to hardware
* starting protocols
* starting traffic
* getting statistics
* port stats
* traffic stats

## Contributing
The purpose of this repository is to allow users to clone the auto generated code. We do not accept pull requests in this repository.

Feedback such as bugs/enhancements/questions regarding the ixnetwork-restpy package is welcomed by opening a [GitHub issue](https://github.com/OpenIxia/ixnetwork_restpy/issues).
6 changes: 5 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Release Notes

### Jan 2020
* 1.0.48
* support ipv6 address with no square brackets in TestPlatform init
* MultiValue.Steps.find() support
### Nov 2019
* 1.0.47
* fixed class generation, invalid property names, docstrings, normalized line endings
* fixed class generation for invalid property names, invalid docstrings and normalized line endings
* RELEASENOTES.md included in distributions
* 1.0.46
* QuickTest TestConfig classes are now supported
Expand Down
7 changes: 4 additions & 3 deletions ixnetwork_restpy/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 1997 - 2018 by IXIA Keysight
# MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
Expand All @@ -16,8 +18,7 @@
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# THE SOFTWARE.
import sys
import re
import logging
Expand Down
15 changes: 9 additions & 6 deletions ixnetwork_restpy/connection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 1997 - 2018 by IXIA Keysight
# MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
Expand All @@ -16,8 +18,7 @@
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# THE SOFTWARE.
import sys
import os
import ssl
Expand Down Expand Up @@ -234,16 +235,18 @@ def _info(self, message):
logging.getLogger(__name__).info(message)

def _warn(self, message):
logging.getLogger(__name__).warn(message)
logging.getLogger(__name__).warning(message)

def _debug(self, message):
logging.getLogger(__name__).debug(message)

def _normalize_url(self, url):
connection = '%s://%s:%s' % (self._scheme, self._hostname, self._rest_port)
hostname = self._hostname
if ':' in hostname and '[' not in hostname:
hostname = '[%s]' % hostname
connection = '%s://%s:%s' % (self._scheme, hostname, self._rest_port)
if url.startswith(self._scheme) == False:
url = '%s/%s' % (connection, url.strip('/'))

path_start = url.find('://') + 3
url = '%s%s' % (url[0:path_start], url[path_start:].replace('//', '/'))
return (connection, url)
Expand Down
22 changes: 22 additions & 0 deletions ixnetwork_restpy/errors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.


class IxNetworkError(Exception):
"""The base error class for all IxNetwork REST API errors"""
Expand Down
21 changes: 21 additions & 0 deletions ixnetwork_restpy/files.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import os


Expand Down
23 changes: 22 additions & 1 deletion ixnetwork_restpy/multivalue.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from ixnetwork_restpy.base import Base
from ixnetwork_restpy.steps import Steps

Expand Down Expand Up @@ -328,7 +349,7 @@ def _custom_select(self):
}
end = self._href.index('ixnetwork') + len('ixnetwork')
url = '%s/operations/select' % self._href[0:end]
self._set_properties(self._connection._execute(url, payload)[0])
self._set_properties(self._connection._execute(url, payload)[0], clear=True)
return self

def Overlay(self, index, value):
Expand Down
21 changes: 21 additions & 0 deletions ixnetwork_restpy/select.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from ixnetwork_restpy.base import Base


Expand Down
24 changes: 23 additions & 1 deletion ixnetwork_restpy/steps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from ixnetwork_restpy.base import Base


Expand Down Expand Up @@ -73,7 +94,7 @@ def find(self, Description=None):
def _custom_select(self, Description=None):
filters = []
if Description is not None:
filters.append({'name': 'Description', 'regex': Description})
filters.append({'property': 'description', 'regex': Description})
payload = {
'selects': [
{
Expand All @@ -92,6 +113,7 @@ def _custom_select(self, Description=None):
}
end = self._parent.href.index('ixnetwork') + len('ixnetwork')
url = '%s/operations/select' % self._parent.href[0:end]
self._set_properties(None, clear=True)
for properties in self._connection._execute(url, payload)[0][Steps._SDM_NAME]:
self._set_properties(properties)
return self
Loading

0 comments on commit fc31719

Please sign in to comment.