Commit Graph

105 Commits

Author SHA1 Message Date
Jay Faulkner 3cfacec14d Fix configuration - virtualpdu in openstack now
This should resolve a zuul config error.

Change-Id: Ife12413abc5dcf2cd581f382a8d2911cb9b9aa59
2023-05-30 09:28:10 -07:00
Zuul 8091ec7b08 Merge "Use openstackdocs theme for docs" 2023-05-09 12:46:44 +00:00
Riccardo Pittau 90d3e46574 Migrate to pysnmp lextudio ecosystem
The pysnmp library is not maintained since 4 years now and it's
incompatible with recent libraries like pyasn1
Its fork pysnmp-lextudio is regularly maintained, we should move
to that.

Depends-On: I90274181c1e027d9b17a556fa1ac4767cbf6b5d0

Change-Id: I448c189bdb034e69c3ba69e799bd025333f5f3d1
2023-04-28 09:27:44 +02:00
Riccardo Pittau c619784aa0 Use openstackdocs theme for docs
Change-Id: I18f996d53e23e0eb3c0961e595fea690ab76db1b
2023-04-27 14:44:55 +02:00
Jay Faulkner f9ce3dc29d Update pep8 deps - hacking to 6.0.0
No code changes needed to be compatible.

Change-Id: I389094bf868ce58104cb880d11e0c0391be9be52
2023-04-24 09:31:38 +02:00
Zuul a9872133e1 Merge "Add doc8 test to pep8" 2023-04-24 07:28:55 +00:00
Zuul a5d236f119 Merge "Remove useless config files" 2023-04-24 07:28:54 +00:00
Riccardo Pittau eaf0ba69db Add doc8 test to pep8
Change-Id: I025e43911196e339a332f586716ff676d49ca82d
2023-04-20 09:46:10 +02:00
Riccardo Pittau 4747315eb5 Remove useless config files
Change-Id: Ifc65ba51750da2e74abf76c6f0e213d63e083c89
2023-04-20 09:40:15 +02:00
Riccardo Pittau a811b8b4b8 Remove ignore F811 flake8 rule
It was fixed during python3 migration and should not be ignored
anymore

Change-Id: I350540b614513da0be509216ce82f086bc6a0bf3
2023-04-20 09:37:41 +02:00
Jay Faulkner 7a4388b95f Fix gitreview; Minor update to readme
Fixes .gitreview file to point to proper repo location.

This removes an old link to internap, and slightly improves the readme.

This likely needs more help, but merging a change will cause the github
mirror for this repo to sync; which is a needed operation right now.

Change-Id: I8d988040cd14a6f7c874ec7592cffd7787b9948b
2023-04-19 16:01:11 -07:00
Riccardo Pittau fad44b2f84 Remove all related translation config from setup.cfg
Also remove babel.cfg

Change-Id: I771875113bcc86f1e76ac759b23abe5ec98b9060
2023-03-02 16:50:50 +01:00
Riccardo Pittau 08a7501f1e Follow up for migration to Python 3
- fix home_page url
- support Python from version 3.8 as it's minimum current version
supported in openstack and by ironic
- put testtools back into test-requirements

Change-Id: I3d975e945661b56f245af923c669d6d9f92f8131
2023-03-02 16:24:55 +01:00
Riccardo Pittau 6b85195cbb Move virtualpdu to Python 3
Python 2 is long gone

Also move all tests in the project and use proper templates

Change-Id: I352074a3a0cc2e1342fe2534153599dcb0360cbe
2023-02-01 16:39:40 +01:00
OpenDev Sysadmins 0be19fe236 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:06 +00:00
Ilya Etingof 765cf1be19 added SNMPv3 support
This change introduces SNMPv3 support along with many encryption
protocols used in SNMP.

Change-Id: I891a8526d3896b6194d0c812b89c9f0130301102
Task: 12072
Story: 1751164
2018-04-03 16:12:06 +02:00
Ilya Etingof ae398e612c SNMP agent rebased on the high-level pysnmp API
This change makes it possible to support all SNMP
versions (including strong crypto features)
as well as IPv6.

The followup patches are expected to implement these
new features.

New `debug_snmp` option added to configuration file
to facilitate troubleshooting of the SNMP issues.

Closes-Bug: #1751163
Change-Id: Iec6452201f85f2f4c486e94abe8c6b6bba68840d
2018-03-20 15:18:32 +01:00
Ilya Etingof 8bc40fff79 fix uninitialized ASN.1 objects use
The underlying pyasn1 library has a notion of `schema` and
`value` object. The `schema` object can't be used with
regular Python operators as values because `schema` does
not carry any value, it's rather a type.

This fix turns a couple of `NoSuchInstance` schema
objects into proper `value` objects to retain compatibility
with the latest pysnmp which removed the default initializer
of the `NoSuchInstance` object.

Change-Id: Id044a0e437724bf1f3581e9187e2a1e6c336b1bc
2018-02-16 11:57:59 +01:00
Jenkins a1c8f82b20 Merge "Add test for the pysnmp handler." 2017-09-05 17:13:59 +00:00
Félix Bouliane 2f5d7edbd3 Add test for the pysnmp handler.
That will ensure this file is well tested and behaves according to the
spec.

Change-Id: I7ff2b14b6ec22162c1f11f2862c0ae301a13b8d8
2017-08-25 12:04:35 -04:00
Jenkins 64f6ce9f5f Merge "Add link to docker container in readme" 2017-07-27 19:06:03 +00:00
Jenkins fabc4be392 Merge "Drop MANIFEST.in - it's not needed by pbr" 2017-07-27 19:05:58 +00:00
Jenkins 772e1be8c4 Merge "Removes unnecessary utf-8 encoding" 2017-07-27 19:05:52 +00:00
Arundhati Surpur 49832949f5 Drop MANIFEST.in - it's not needed by pbr
virtualpdu already uses PBR:-
setuptools.setup(
	setup_requires=['pbr>=1.8'],
	pbr=True)

This patch removes `MANIFEST.in` file as pbr generates a
sensible manifest from git files and some standard files
and it removes the need for an explicit `MANIFEST.in` file.

Change-Id: I3dbeb53faf46d681f5efdedb54159b2dd2c8b232
2017-07-27 18:47:03 +00:00
Arundhati Surpur 2d300b1769 There is no documentation for virtualpdu
So removing the documentation link.

Change-Id: Ib7b7853f58684ec1ca96a857f01ca6547a698ac9
2017-07-27 18:46:53 +00:00
Félix Bouliane e214294b79 Add link to docker container in readme
This can be useful for library users.

Change-Id: I031cc3db97dfe96a7b6480fb15d5452b91a06d58
2017-07-27 18:46:44 +00:00
Arundhati Surpur 230f77d36b Removes unnecessary utf-8 encoding
This patches removes unnecessary utf-8
encoding in doc/source/conf.py

Change-Id: I9465b313a698a3a11a38fa589dd342f17ce05018
2017-07-27 18:46:15 +00:00
Félix Bouliane 32bfd146b9 Add errors that were added with pysnmp 4.3.6
We recreate pysnmp errors within virtualpdu and errors has changed with
pysnmp 4.3.6

By adding the test name, the exceptions are now in sync.

Change-Id: I2d4dccde08bd85a166e8dd3e0f1d0708ea0f0c69
2017-07-27 14:33:35 -04:00
Marc Aubry a86e32c8f3 Updating pyasn1 and pysnmp<5.0.0,>=4.3.4
Change-Id: Ice5622439af74a88bbee7caf3cef49cca0f238de
2017-03-03 15:57:00 -05:00
Jonathan Provost 219332e4eb Merge pull request #46 from JoProvost/wrong-oid
Fix OID for sysDescr and sysObjectID
2016-11-21 14:39:26 -05:00
Jonathan Provost 01aa330d38 Fix OID for sysDescr and sysObjectID 2016-11-21 14:29:58 -05:00
Martin Roy 4e3370fa39 Merge pull request #45 from fbouliane/revert-transitive-states
Make the internal state change synchronous
2016-11-21 13:39:33 -05:00
Félix Bouliane 84a7a95443 Make the internal state change synchronous
If async, could occur problems when multiples actions are queued. This
make sure there is no wait between calls.
2016-11-21 11:54:32 -05:00
Philippe Godin 01de292b7a Merge pull request #44 from fbouliane/revert-transitive-states
Make sure transitive state is target state
2016-11-21 11:35:49 -05:00
Félix Bouliane e02c6cae08 Make sure transitive state is target state
Since libvirt make takes really long for a change to take effect (>10
sec) this make sure that the target state is return when doing a snmp
get in the meanwhile.
2016-11-21 11:28:55 -05:00
Mathieu Mitchell 6985af8fcb Merge pull request #42 from fbouliane/test-transitives-states
Ensure state changes only when driver is done
2016-11-14 20:51:40 -05:00
Mathieu Mitchell a16259dcef Merge pull request #43 from fbouliane/add-timestamp-to-log
Add timestamp to log
2016-11-14 20:49:50 -05:00
Félix Bouliane d7a5184ad9 Add timestamp to log
This will allow to debug timing issues using virtualpdu's log
2016-11-14 17:20:55 -05:00
Jonathan Provost da1b0be74c Merge pull request #39 from fbouliane/add_py34
Make sure virtualpdu is tested on py27,34,35
2016-11-14 15:16:24 -05:00
Félix Bouliane 500eeb389f Ensure state changes only when driver is done
When doing a Power_off, the state will be on while the change and will
become ON only when libvirt is done changing the state.
2016-11-14 13:51:28 -05:00
Félix Bouliane a49c75a19c Merge pull request #41 from JoProvost/pdu_size_support
Add support for custom PDU outlet count
2016-11-11 16:35:29 -05:00
Jonathan Provost 612a8de098 Add support for custom PDU outlet count
The number of outlet may now be specified at the constructor call of the
PDU class.  If defined, it will override the PDU class specific outlet
count.

Also, the SNMPPDUHarness.stop method was not protected with a lock.
Without this, the stop method simply fails to stop the thread if called
just after the start method.

Reviewed-By: Maxime Dupuis <mdupuis@internap.com>
2016-11-11 16:01:35 -05:00
Jonathan Provost 72b21fefe3 Merge pull request #40 from WebF0x/fix_reboot_on_state
Store POWER_ON state when performing a REBOOT
2016-11-10 11:50:24 -05:00
mdupuis f20cba6639 Store POWER_ON state when performing a REBOOT
Before, the outlet command was stored, it was working as expected for
POWER_ON and POWER_OFF but the REBOOT command is not a state. This is
why we introduced a command to state mapping in the core.
2016-11-10 11:36:02 -05:00
Félix Bouliane 64cf340928 Make sure virtualpdu is tested on py27,34,35
Those are the version supported by ironic, we should be able to build
virtualpdu with these version.
2016-11-09 17:18:15 -05:00
Félix Bouliane cda240b7c9 Merge pull request #38 from WebF0x/fix_pep8
Fix PEP8
2016-11-09 17:17:20 -05:00
mdupuis 1cac188e46 Fix PEP8
Add check for PEP8 in Travis
Also upgrade to Python 3.5
2016-11-09 16:56:57 -05:00
Mathieu Mitchell ca48a93048 Merge pull request #37 from stephanerobert/executor
Taking executor out of the context
2016-11-09 16:46:59 -05:00
srobert 1980992828 Taking executor out of the context 2016-11-09 15:08:39 -05:00
Jonathan Provost 6daec3f99d Merge pull request #36 from stephanerobert/async_switch_call
Async calls to libvirt driver
2016-11-09 12:56:39 -05:00