Commit Graph

138 Commits

Author SHA1 Message Date
Riccardo Pittau 73b4e3de5f Move back to simple pyasn1
The pyasn1 lextudio fork is not maintained anymore

Change-Id: Ie0faeb011309c12a9d448feb10c22694fe2c0b5a
2024-03-15 10:40:46 +01:00
Riccardo Pittau a0d98f9eaa 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.
For more info see https://github.com/etingof/pysnmp/issues/429

Change-Id: Id6dbf28d69e60465e7c8a71d6afbe227378ee60a
2023-08-25 06:56:44 -04:00
Vanou Ishii 56273075aa Modify incompatible default value passed to requests
This commit fixes incompatibility imported in
274dca0344 which
changes default value passed to requests module function.

Change-Id: I67663e6bd6e060f572e9c26cf504abd31ba49402
2022-07-29 17:34:59 +09:00
Zuul 5624f8a68c Merge "Encode parameters passed to pyghmi.ipmi.Command" 2022-07-15 05:55:36 +00:00
Shukun Song 7b530fa24b Encode parameters passed to pyghmi.ipmi.Command
Currently there is an issue in pyghmi which is if the userid or password
passed to Command is string, the Command would not be initialized
correctly and the program will stuck if someone uses the same parameters
to create a Command object twice in a short time.

This issue can be work around by passing the utf-8 encoded userid and
password when creating a Command object.

Change-Id: Id99e61da0a40d64ac3a766b9868580d4d580b9d7
2022-07-11 19:52:19 +09:00
Shukun Song 1dfbad7e14 Change the name of keys to mask passwords
The names of SNMPv3 related keys used in driver_info have been changed
to mask passwords. This patch is a related change.

Change-Id: I9fdefbb539ecd0543156bafddb4caaa229e4a4ec
2022-07-11 19:51:10 +09:00
Shukun Song e0590f59fb Add v3 authentication functionality to snmp module
Currently the snmp module implemented by python-scciclient does not do
any v3 authentication. This will cause failure when using SNMPv3 to
communicate with servers.

This commit fixes the above issue.

Change-Id: I95537918702e37d98b57b07bca88ed638e879dd8
2022-06-13 14:09:06 +09:00
Vanou Ishii 274dca0344 Add parameter to specify certification file
This patch adds functions & methods which have been used to connect
to iRMC via HTTPS to accept additional parameter.
With additional parameter, user is able to specify certification file.

Co-authored-by: Kobayashi Daisuke <kobayashi.da-06@fujitsu.com>
Change-Id: I51203e16207f8d3b1448b581942111bff60d0c86
2022-06-01 17:40:12 +09:00
vanou a28eb28775 Add function to determine virtual FD support
iRMC dropped support of virtual floppy disk at specific
iRMC firmware version.

iRMC S4 supports virtual FD till version 9.21F and deprecates
it from version 9.62F
iRMC S5 supports virtual FD till version 1.25P and deprecates
it from version 1.60P

This commit adds functions which determine whether iRMC supports
virtual floppy disk based on iRMC firmware version.

Change-Id: I024b6fb09ebe3c3ffe7ccfff5cf8b2e5b844be94
2022-01-17 09:38:05 +09:00
Nguyen Quang Huy 6c3487815b Fix bug of eject virtual CDROM in scciclient
This change will fix the case when Ironic tries to detach virtual CD if there is no ISO file attached.
This applies to  virtual floppy case as well.

Change-Id: I4df5f6aa160fea0aff745fe929680aa61282c33e
Signed-off-by: Nguyen Quang Huy <huynq@vn.fujitsu.com>
2022-01-17 09:05:16 +09:00
vanou 3f45624aa6 Add description of iRMC S5 support
We start to support iRMC S5 in python-scciclient library

Change-Id: Ie4512d8843e4ec843103dbf3dda852ea3fe6eaa8
2022-01-10 20:38:04 +09:00
vanou 435484df1b Use standard library unittest.mock instead of mock
Use unittest.mock instead of mock.
Because mock became part of standard library
and available as unittest.mock since Python 3.6

Change-Id: Ibfe27316c20fa2c8935b559fed7885a6e194d314
2022-01-10 19:01:19 +09:00
vanou 8e527de430 Use defusedxml instead of standard xml
Because XML handling modules in xml Python standard library
are vulnerable[1], we should use defusedxml[2] for parsing XML.

[1] https://docs.python.org/3/library/xml.html#xml-vulnerabilities
[2] https://pypi.org/project/defusedxml/

Change-Id: I8ff057ee64c04c4cd5c92abf3e31b52c6225ed76
2022-01-10 18:29:18 +09:00
vanou 8bf25f738d Drop Python2.7 support
Because Python2.7 is last release of Python2.x series and
Python2.7 support stopped in 2020, we need to drop Python2.7
related things. This commit cleanups Python2.7 related contents.

Change-Id: I92eed041d993af924d93373977aef33cda0f7cf8
2022-01-10 11:54:07 +09:00
Riccardo Pittau 4fc22425fe Use only Yoga tests
TC has decided to keep support for Python 3.6 during the Yoga cycle.
For more info see [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-December/026164.html

Change-Id: I0ac128e386818dd03d64dfebf7f2c4a1e5ec3e28
2021-12-03 08:45:08 +01:00
Riccardo Pittau 6e6e49ddb9 Use current openstack tests
Change-Id: If8fb44687415137ac3abde09b6f168b54eb30624
2021-11-30 09:58:07 +01:00
Thomas Bechtold 21a184bff2 Bring tests to current openstack release
Switch from oslosphinx to openstackdocstheme
That's what the OpenStack community is using today. Also with newer
Sphinx versions, the current approach does no longer build.

Re-add docs and requirements tests.

Switch to xena standard jobs.

Change-Id: I3f93a400bb83f4a91bd77ebe69f609949cd43ca7
2021-08-12 08:17:53 +02:00
Jin Hase 34ccd96c12 Temporarily comment out the operation of deleting the profile
Change-Id: If8e03826ad58cf5caa1d0c557f3a546e7ae4c3dc
2021-07-20 18:12:46 +09:00
yatinkarel 82b8e6da2e Use assertCountEqual instead of assertItemsEqual
The assertItemsEqual method has been removed in Python 3.3 [1] but
it was kept alive by unittest2, imported by testtools. For better
compatibility, change to assertCountEqual.

[1] https://bugs.python.org/issue17866

Change-Id: Ia006ecb834f180dbaef5a617269fe8416769e109
2021-05-12 10:36:21 +05:30
Jin Hase e66d50cd3f Modify some description
Change-Id: Ibef901543628ae5c1a8cdc0694427d4ffcab8871
2021-02-18 17:03:49 +09:00
Zuul 88f8abae2d Merge "Add Python 3.6 classifier to setup.cfg" 2021-02-15 13:14:00 +00:00
Zuul 79cbfbb15d Merge "Change openstack-dev to openstack-discuss" 2021-02-15 12:20:54 +00:00
Riccardo Pittau 3c37174384 Update min version required for pyghmi
Version 1.0.24 contains the fix for a typo in the ipmi submodule [1]

https: //opendev.org/x/pyghmi/commit/01ad6710c40be954b0da11fe24b1db31c05797e3
Change-Id: I9dd367671e6c80d39b0c93f2ecb0ec6434f1ea7f
2021-02-08 09:05:24 +00:00
Riccardo Pittau 1d160de11c Make CI work
Update tox.ini to be current.
Move some requirements from test-requirements directly to tox.ini.
Include a py27 constriants file for running py27 tox tests.
Remove lower-constraints.txt, it's not used anymore.
Use wallaby jobs.

Also fix some pep8 issues.

Change-Id: Ia29128ed6c12e1c51c0a34556051a3566c4f9bfd
2021-01-29 15:04:14 +01:00
qingszhao efd5c0851b Add Python 3.6 classifier to setup.cfg
Change-Id: I2d356debc7174a933d15faab377f79541c9690d9
2020-01-29 07:58:14 +00:00
98k ef65ec35ae Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: Id7a1b0f39e939bea667f5e450a803b8952500c30
2020-01-29 07:56:52 +00:00
Dao Cong Tien 3e595d8026 Adds a sleep(3s) after performing power on/off/reset
In async mode, performing power on/off/reset will return
immediately. However, if we perform multiple power actions
in parallel or in a tight sequence, an Error 5 (Input/Output
error) will happen. This bug can be reproduced by doing
RAID config from Ironic CLI.

This patch adds a sleep of 3 seconds to make sure calling
code can't perform some power actions too quickly.

Change-Id: Iacf43a2ca34822b2b59683f4c5b08b78074e5b5f
2019-11-18 13:59:27 +07:00
Zuul 07500a0c3e Merge "Use template for lower-constraints" 2019-07-30 02:07:46 +00:00
Zuul 2c0791e00f Merge "Don't quote {posargs} in tox.ini" 2019-06-11 07:56:49 +00:00
OpenDev Sysadmins 6cba7fb3e7 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:44 +00:00
Yushiro FURUKAWA 4585ce2f76 Fix getting RAID configuration for iRMC S5
In case of iRMC S5, there is no key named 'LogicalDrives' with no RAID
configuration.  This patch changes to use ".get()" for this key.

Change-Id: Ia2de9d2025d317ff0fa87d9b82a9783e73874f05
2019-03-22 14:32:06 +09:00
Vieri ae7bc81d10 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I93bdc97f291d9b2df9f5cec7d907ffc66285ea08
Closes-Bug:  #1801455
2019-03-14 09:09:26 +00:00
Zuul eb3c658fc4 Merge "Support firmware upgrade for iRMC and BIOS" 2019-03-11 08:48:21 +00:00
Andreas Jaeger a8b5418e95 Use template for lower-constraints
Use openstack-lower-constraints-jobs template, remove individual
jobs.

Change-Id: I05d5272dd996fd0e991edb80ecbc3d2b9d3456c3
Needed-By: https://review.openstack.org/623229
2018-12-20 21:50:00 +01:00
Nguyen Van Trung 1d5668953f Support firmware upgrade for iRMC and BIOS
This change will implement firmware upgrade for
iRMC and BIOS along with suitable images.

Tested on Fujitsu TX2540M1 successfully.

Change-Id: I097997031eaf54f7634ba97d05786201fc8b1e9e
2018-11-05 16:24:50 +07:00
Zuul d751993972 Merge "Removed older version of python added 3.5" 2018-10-11 07:57:57 +00:00
Zuul 6f8a44227c Merge "fix tox python3 overrides" 2018-10-11 07:55:53 +00:00
qingszhao 2600919b25 Removed older version of python added 3.5
In setup.cfg file the python 3.5 is added

Change-Id: Iefd86aabd8442b5bdc4a7071d0a59f7a447516d5
2018-09-29 20:14:45 +08:00
qingszhao b45107b52f fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ide1f5e82f123ff6b35fd141919e842738ac500a2
2018-09-29 20:14:19 +08:00
Yushiro FURUKAWA 2ba631074d Fix coverage command for tox
This patch fixes to specify project name directly and ignores cover/
directory in running 'tox -e cover'.

Change-Id: I76ed822a6143269ea1bc75c04164262360cde30a
2018-09-18 12:52:00 +00:00
Thomas Goirand d8f1f1c73b Fix async keyword for Python 3.7
In Python 3.7, async becomes a keyword, and therefore, scciclient was
failing. This patch renames async into do_async.

Change-Id: I030cd6d9f3e35a9850771b2c55943e043818309a
2018-08-24 14:05:36 +02:00
Zuul a38fd836e8 Merge "Switch to stestr" 2018-08-10 05:23:22 +00:00
Dao Cong Tien ea8d111201 Fix bug of missing versions when setting secure boot flag
iRMC firmware versions 8.64F and 8.84F or newer
require bios config data provided with versions.
This patch updates the existing set_secure_boot_mode()
as it does not provide versions when setting.

Tested on servers with FW 8.43F, 8.64F and 8.84F.

Change-Id: I97aa13436c80be311738712a3c36cc4a8beb9e63
2018-07-25 10:36:39 +07:00
Zuul a6c68f803b Merge "Follow-up to BIOS configuration feature" 2018-07-18 07:40:55 +00:00
Nguyen Van Trung ae072a408e Follow-up to BIOS configuration feature
This path will process following items:

- Allow setting along with different iRMC versions.
- Fix bug which relate to boolean values during setting.
- Store string value when perform get BIOS setting.
- Remove .key() and allow working in python3.

NOTE: Integer value under string has accepted for BIOS
      input already (tested).
      e.g: {"name": "cpu_active_processor_cores","value": "2"}

Tested with TX2540 M1 successfully.

Change-Id: Ie79992b09754987d1891fffbf106ab1fdc3fc48b
2018-07-18 09:12:45 +07:00
Hironori Shiina 1de27e4144 Set profile version for VIOM configuration
eLCM API got requiring a profile version after an update. This patch
adds the profile version for avoiding this incompatibility.

Change-Id: I0165648a35645abc934243417a0890e89d96212a
2018-07-17 19:30:24 +09:00
Luong Anh Tuan 221f26e1fc Add APIs support BIOS configuration
The python-scciclient don't have APIs to support BIOS configuration.
This patch adds function set_bios_configuration and get_bios_settings
to support bios configuration on python-scciclient.

Co-Authored-By: Nguyen Van Trung <trungnv@vn.fujitsu.com>
Change-Id: I755e9412e4fadb74dff5e950e26c405512757b8b
Story: #1743674
2018-07-10 10:36:46 +07:00
Vu Cong Tuan cb70ee0bbb Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I96505e8e9c08db43181fbb59a01ceaccdd436d37
2018-07-10 07:46:38 +07:00
Nguyen Van Trung b798c1c2e8 Move BGI into FGI mechanism for safe operation
This commit will move background initialization(BGI) into
foreground initialization (FGI). Due to safe opperation, we
need prevent any accessing during RAID configuration. Thus
FGI mechanism is suitable solution for us.

Change-Id: If90f2f79df1f7928c0177d1f8b22623d37e4bc0a
2018-06-07 10:12:04 +07:00
Zuul 7c1c9288de Merge "Add new cpu_fpgas capabilities to ironic" 2018-05-22 07:24:11 +00:00