Commit Graph

77 Commits

Author SHA1 Message Date
Sharpz7 fd0d8171b7 [codespell] Adding Tox Target for Codespell
Second in a series of commits to add Codespell to Ironic Repos. This one adds the command that was used to fix the spelling errors.

Future Commits will add CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: I2e356fb4dea543d6e57614394d439a6767498f8d
2024-01-25 21:22:18 +00:00
likui 0fb55899f0 Update python classifier in setup.cfg
As per the current release tested runtime, we test
till python 3.11 so updating the same in python
classifier in setup.cfg

Change-Id: I6cfc38e2d7b1d272acbe6b6d904e09c172bce78c
2024-01-15 14:14:41 +08:00
likui 53778d62f1 Add python3.10 support in testing runtime
In 2023.2 cycle testing runtime, project started adding python 3.10

[1] https://governance.openstack.org/tc/reference/runtimes/2023.2.html

Change-Id: I49200c48d2331cdeef9ceccb32e1f5b032d3c0ce
2023-07-31 15:25:30 +08:00
likui 14455c6647 The Python 3.6 and Python 3.7 Support has been dropped since zed
[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: Ic0ed5e97d879b676382529de0ca3b9e10d681835
2022-05-12 09:14:26 +08:00
Riccardo Pittau fe32ebdfea Re-add python 3.6/3.7 in classifier
We have updated the yoga testing runtime to keep the
py36 testing.

- https://review.opendev.org/c/openstack/governance/+/820195

Unit tests job template is also updated to keep python
3.6 as a voting job. So with the py3.6 and py3.9 testing as voting
job template, we are keeping python 3.6, 3.7, 3.8, and 3.8 as
tested versions in the Yoga cycle.

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

This commit re-add the python 3.6/3.7 versions in setup.cfg classifier.

Change-Id: I1600a9c56e85e8c6dcb68277f9d0e3396f92dac9
2021-12-14 09:17:37 +01:00
Ghanshyam Mann e20c7aaf26 Updating yoga tested python versions in classifier
Yoga testing runtime has been updated with py38 and py39
as voting and removed the py36 testing. Unit tests update are
handled by the job template change in openstack-zuul-job and you
can see the updated jobs running in gate.

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/818609

this commit updates the tested py versions in setup.cfg classifier.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: Idbc2a716eec5fd5710fc5ea493600a3519a37bdb
2021-11-24 19:51:58 -06:00
XinxinShen 1600dbc65f setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I8aa117a2ab38af4a82abfdd65e9dac103827ffbb
2021-05-04 17:12:40 +08:00
Julia Kreger 901c816b23 Add upgrade check, and json2yaml policy handling
Adds the ironic-inspector-status command as well with the
requried upgrade check.

Mostly based upon https://review.opendev.org/#/c/763262/
which is based upon https://review.opendev.org/#/c/748059/

Note: Also had to update the version of eventlet because
existing minimum requirement was seemingly incompatible with
prior versions and would prevent lower constraints testing
to proceed due to issues with ``os`` being patched by eventlet.

Change-Id: I1f479f834f1d79e9eeb591c58a52b6ab80c24534
2021-01-04 13:56:28 -08:00
Kaifeng Wang de2a27ad8b Identify accelerator devices during introspection
Identify acclerator devices by processing pci devices and update to
ironic node when found. Currently only Tesla T4 from NVIDIA is
supported.

Change-Id: Id702cb04cb2445d544965821680cd0cc5cfd37e5
Story: 2007971
Task: 40473
2020-08-20 14:03:37 +08:00
maaoyu 5d61513923 Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I0aa7f17f72438dd8eefb8f223ff7222064e4e99c
2020-05-25 10:55:05 +08:00
melissaml 1818bda3ca Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Change-Id: I50b21243d9e12b2953ff9a02b7ed8030686176ec
2020-05-14 16:10:34 +08:00
Zuul 436fd8ad99 Merge "Cleanup py27 support" 2020-04-22 01:46:42 +00:00
Andreas Jaeger 1a8c1bb370 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build with apidoc extension
- Use newer openstackdocstheme version
- Remove Babel requirement, this is not needed.

Change-Id: I4176d8002d45449171aa5f7a7caef196ab7900d0
2020-04-20 08:18:51 +02:00
Harald Jensås 92e2d26f15 Port physical network CIDR map hook
The physnet_cidr_map hook adds functionality to
populate the physical_network of a baremetal port based
on a cidr-to-physnet mapping in configuration.

Related-Bug: #1870529
Change-Id: I43cdac5ccd8c46836b26f6e4bc0d4509958e2e79
2020-04-17 16:31:40 +02:00
Kaifeng Wang 0e3cd671da Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

ironic-inspector is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal - https://review.opendev.org/#/c/691178/

Change-Id: Ifae00adf782b6a7d71c4dc45a69a9638b8514d30
2019-11-22 11:17:34 +08:00
Kaifeng Wang 293b0c7c15 Split API and conductor services
This patch splits API and conductor services for ironic-inspector.
Previous patch utilized lock from tooz coordinator, this patch adds
a coordinator wrapper for easier usage and further introduces group
interfaces.

Each conductor service will join a predefined group to mark it's
availability, on each request, API service will query members from
the group and randomly choose on of them, create desiginated topic
and deliver request to it.

The feature is tested with the memcached, file backend of tooz.
Other backends are not fully tested but may work as well, please
refer to tooz documentation for driver compatibilities[1].

[1] https://docs.openstack.org/tooz/latest/user/compatibility.html

Story: 2001842
Task: 30376

Change-Id: I419176cd6d44d74c066db275ef008fe8bb6ef37a
2019-08-12 15:29:55 +08:00
Kaifeng Wang 59a4c64670 Move dbsync to the correct path
command line script should be placed in the cmd directory.

Change-Id: Ifc3a9c81b0c61d8b5c9d9f4009164ec3c91ce042
2019-07-05 15:44:34 +08:00
Kaifeng Wang 686a64b08e Update Python 3 test runtimes for Train
One of train goals to have consistent python3 jobs.

https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Iad68769d4ebed4a8e2dcb4eb0317bad40e6a27f2
2019-06-13 11:18:49 +08:00
Kaifeng Wang 1d94e534b9 introspection data backend: migration tool
This patch provides a simple tool to help with migrating introspection
data between two introspection data storages.

Story: 1726713
Task: 11373

Change-Id: I2a930dbad2178e3dde6725e2620d8099e4e21d78
2019-02-27 09:33:02 +08:00
Zuul 13e70283b1 Merge "introspection data backend: plugin layer" 2019-01-23 03:29:15 +00:00
space d278bb6f77 introspection data backend: plugin layer
Configurable introspection data storage backend [1] is proposed
to provide flexible extension of introspection data storage
instead of the single support of Swift storage backend.

This patch adds plugin mechanism for loading introspection
storage, creates database backend and moves Swift storage
into a plugin.

[1] http://specs.openstack.org/openstack/ironic-inspector-specs/specs/configurable-introspection-data-backends.html

Story: 1726713
Task: 11373

Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: Ie4d09dc0afc441b20a1e5e3bd8e742b1df918954
2019-01-07 17:31:15 +08:00
melissaml 63dceb507e Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I6d9ae8e65f09608286a0181b1ae5f1c82cf0e155
2018-12-05 03:21:29 +08:00
Dmitry Tantsur 0a26a6677d Add introspection rules actions to add/remove traits on nodes
Otherwise it's not possible to modify them, since they're not updated
via the regular node updating mechanism.

Change-Id: I338015ff9dafe07f4e70a23ddcf6cd488eda9907
Story: #2003788
Task: #26496
2018-09-18 10:13:48 +02:00
Dmitry Tantsur 34324112e0 Declare support for Python 3.5 in setup.cfg
This is required for the Python 3.5 goal to be finished for real.

Change-Id: I66a3a50575ce4547bf04e3835a5c92c85977201a
Related-Bug: #1673768
2018-01-31 12:46:06 +01:00
Zuul c0c1dd813d Merge "Centralize config options" 2018-01-09 12:07:50 +00:00
John L. Villalovos d7e1841680 Remove ironic_inspector/test/inspector_tempest_plugin/ directory
We now use the project openstack/ironic-tempest-plugin to store our
tempest plugin. All content from the
ironic_inspector/test/inspector_tempest_plugin/ directory has been
ported to that project.

We no longer want to have the plugin content stored here so we can
now delete it.

Change-Id: Ia8ea3a74d5aba1ea27eb6715c21667a30bac56b4
2018-01-05 12:52:54 -08:00
Pavlo Shchelokovskyy 71a2bef7d9 Centralize config options
Consolidate all config options under ``conf`` directory.

New config modules should give a better picture of the configuration
options provided by the inspector.

Change-Id: I501ed0787ff4e1d91462f936e1a54de2c7abb35c
Related-Bug: #1561100
Co-Authored-By: Anton Arefiev <aarefiev@mirantis.com>
2018-01-04 20:43:58 -08:00
dparalen 8ddfacdf34 Introducing a dnsmasq PXE filter driver
A PXE filter driver is introduced that works by configuring and controlling
the dnsmasq service.

Closes-Bug: 1693813
Related-Bug: 1665666
Change-Id: I63fe91ee4f9ac3021bcfd9a4a378af56af800fac
2017-11-22 15:08:23 +01:00
Zuul f02eda0315 Merge "Refactoring the firewall" 2017-10-19 21:40:25 +00:00
dparalen 7b27585463 Refactoring the firewall
Adopting the PXE filter interface/driver concept

Related-Bug: 1665666
Change-Id: If83db978080b9c4e5d51ba50bbe8ed26e29abe83
2017-10-19 16:38:15 +02:00
Pavlo Shchelokovskyy 198ef70c2b Add request context and policy enforcement
this patch introduces an oslo.policy-based API access policy
enforcement engine to ironic-inspector.
As part of implementation, a proper oslo.context-based request
context is also generated and assigned to each request.

Short overview of changes:

- added custom RequestContext class

  - extends oslo.context to handle of "is_public_api" flag
    (False by default)

- added context to request in each API route

  - '/continue' api sets the "is_public_api" flag to True

- added documented definitions for API access policies and their
  defaults
- added enforcement of these policies on API requests
- added oslo.policy-specific entry points to setup.cfg
- added autogenerated policy sample file with defaults
- added documentation with autogenerated policies

Change-Id: Iff6f98fa9950d78608f0a7c325d132c11a1383b3
Closes-Bug: #1719812
2017-10-13 11:55:52 +00:00
Jenkins 1401439a6f Merge "Update URL home-page in documents according to document migration" 2017-07-25 18:34:54 +00:00
dparalen cc7b98aa10 Introducing the contributor content
Moving the contributor "link" and API down the mandatory directory
structure.

Change-Id: I111cd55a06e40dc4db649728a5025354a85b3e1d
Partial-Bug: 1702142
2017-07-21 10:22:33 +02:00
Luong Anh Tuan c23a79b81a Update URL home-page in documents according to document migration
Change-Id: Idd05534051891477343f94635d89e694c145d7f6
2017-07-14 02:53:26 +00:00
dparalen e02bc755a6 PXE boot filtering drivers
Introduce a driver concept for PXE filtering

Change-Id: I73297771c4118f368b80a5f1021a0d5c3fc8b96e
Closes-Bug: 1665666
2017-06-28 12:25:37 +02:00
Vu Cong Tuan 75033eca66 Remove pbr warnerrors in favor of sphinx check
This change removes the now unused "warnerrors" setting,
which is replaced by "warning-is-error" in sphinx
releases >= 1.5 [1].

[1] http://lists.openstack.org/pipermail/openstack-dev/
2017-March/113085.html

Change-Id: I05b19288a444d346cebe83a9aa0422d8655f6f0c
2017-06-09 17:24:48 +07:00
Anton Arefiev 50ed0bdbae Preparing for service splitting
Creates new WSGIService class which keeps base API sercice
initialization functionality and serve flask application. Also
it will configure application for wsgi container[1].

Also creates new `cmd` directory for storing console scripts.

[1] https://governance.openstack.org/tc/goals/pike/deploy-api-in-wsgi.html

Related-Bug: #1525218
Change-Id: Ia64228c47a79a3008d435e8323a964f2bc45dfa7
2017-05-26 11:59:35 +03:00
Bob Fournier 8834927d4c Add plugin to process basic management LLDP TLVs
This adds a plugin to process the raw LLDP TLVs stored in Swift for
the Basic Mgmt, 802.1, and 802.3 data sets and store the parsed data
back in Swift.  It implements the TLV processing as described in the
specification:
http://specs.openstack.org/openstack/ironic-inspector-specs/specs/lldp-reporting.html

Change-Id: I854826787ff045ffb2807970deaba8b77cbe277d
Closes-Bug: 1647515
Related-Bug: 1626253
2017-01-31 19:51:39 -05:00
Cady_Chen b917c74908 Add author and author-email in setup.cfg
Change-Id: I220b7d3c37891eb68a9d105945d80a77736c106e
2016-12-14 10:37:10 +08:00
avnish cc44415523 modify the home-page info with the developer documentation
Change-Id: Iff43acf4db1ec7b46bd35829d529192ecf443cb9
2016-09-20 13:11:14 +05:30
Szymon Borkowski e686892739 Add PCI devices plugin to inspector
Adds a new plugin to distinguish PCI devices returned by Ironic
Python Agent. Recognized PCI devices are then registered in node
capabilities and later can be used by nova flavors.

Change-Id: I6565b8c4aa76de240a6c4d795635300ff2d0c30b
Partial-Bug: #1580893
2016-09-01 10:55:02 +02:00
Sam Betts 4af672b849 Add GenericLocalLinkConnectionHook processing hook
For Ironic multi-tenant networking support, we need to be able to
discover the nodes local connectivity. To do this IPA can try to pull
LLDP packets for every NIC.

This patch adds a processing hook to handle the data from these packets
in ironic-inspector so that we can populate the correct fields fields in
Ironic. The generic lldp hook only handles the mandatory fields port id
and chassis id, set on port_id and switch_id in local_link_connection.

Further LLDP fields should be handled by additional vendor specific LLDP
processing hooks, that populate the switch_info field in a non-generic
way.

Change-Id: I884eaaa9cc54cd08c21147da438b1dabc10d3a40
Related-Bug: #1526403
Depends-On: Ie655fd59b06de7b84fba3b438d5e4c2ecd8075c3
Depends-On: Idae9b1ede1797029da1bd521501b121957ca1f1a
2016-07-29 15:00:22 +01:00
Dmitry Tantsur 457c1277de Remove deprecated alias "root_device_hint" for "raid_device" hook
Deprecated in 3.1.0 (mid-Mitaka). Probably also completely unused.

Change-Id: Id1ea1e63e212a94dce61bd03c4217611cca3cd2e
2016-06-06 19:07:24 +02:00
Dmitry Tantsur b2c2767147 Add a plugin for capabilities detection
Supports boot_mode and CPU flags.

Change-Id: Idee87a9fa0c89e51993735e69906f5688bfe23aa
Closes-Bug: #1571580
2016-06-06 13:18:09 +00:00
Anton Arefiev 50783c14f1 Tempest plugin initial commit
This patch contains tempest plugin interface which are generated by
tempest-plugin-cookiecutter[1].

Also empty test manager and basic test was added.

[1] https://github.com/openstack/tempest-plugin-cookiecutter

Change-Id: I333462987bb6cdd1933fbb3550f527364c74ba07
2016-04-08 11:48:21 +03:00
Jiri Tomasek 19fe16fd42 Added CORS support to Ironic Inspector
This adds the CORS support middleware to Ironic Inspector, allowing a deployer
to optionally configure rules under which a javascript client may
break the single-origin policy and access the API directly.

OpenStack CrossProject Spec:
   http://specs.openstack.org/openstack/openstack-specs/specs/cors-support.html
Oslo_Middleware Docs:
   http://docs.openstack.org/developer/oslo.middleware/cors.html
OpenStack Cloud Admin Guide:
   http://docs.openstack.org/admin-guide-cloud/cross_project_cors.html
DocImpact: Add link to CORS configuration in admin cloud guide.

Change-Id: I467d4e14b27f1d4808786d431aff66808c707a99
2016-03-14 15:29:09 +01:00
Jenkins 262972db94 Merge "Generate API documentation from Python modules" 2016-03-10 09:48:47 +00:00
Jenkins 9987d8841e Merge "Deprecate root_device_hint name for raid_device plugin" 2016-03-09 14:39:23 +00:00
Zhenguo Niu bc1d71f086 Deprecate root_device_hint name for raid_device plugin
Change-Id: I4da2d156007ec320e3399d0bb2bb02d039b3724b
Closes-Bug: #1528830
2016-03-09 00:04:41 +08:00
Dmitry Tantsur 3975337875 Generate API documentation from Python modules
Also brings "contributing" section toctree depth to the same level as
everywhere.

Change-Id: I661a0c7045fe945bfa7bd99589751c4aad63a61c
2016-03-08 15:07:44 +01:00