This is a tox job to scan the RPM specfiles and do some
initial sanity checks and use the OpenDev Spec-Cleaner tool, this
is not a 'linter' per-se, but will output a diff of recommended
changes for the specfile.
Initial disable cleaning our default CentOS specfiles since we
know they need work, we can enable this later.
This uses the speclint script in starlingx/integ a proposed
by the Depends-On.
The recommended guildline for openSUSE is located here:
https://en.opensuse.org/openSUSE:Specfile_guidelines
Fix up fm-rest-api opensuse specfile
Depends-On: https://review.opendev.org/664995
Change-Id: I46da780a667569a9dccedd551d955c983e9601cd
Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit adds the RPM specfile that supports openSUSE, these
include the _service file which creates the tarball, the changes
files and specfile itself.
These are all built via the OpenBuildService (OBS) and can be
found here:
https://build.opensuse.org/project/show/Cloud:StarlingX:2.0
Change-Id: I676aae8cb9554eab2740232fd0dd77e0ed876506
Signed-off-by: Saul Wold <sgw@linux.intel.com>
The dependency resolver for RPM relies on the shebang to have the
interperter that will be used in order to get things right, so
change shebang to /usr/bin/python.
In other cases, the shebang is not needed at all as these are not
really executable python files, they are part of the python package.
RPMLINT finds these and complains that a non-executable has a shebang.
Change-Id: Ie90a846d6addffca1225e59fd8b6f3753d2991a4
Signed-off-by: Saul Wold <sgw@linux.intel.com>
The Maintainer was change from a proper name to the StarlingX
project as it can be confusing the responsibilities of the person.
Change-Id: I32faf658388bc38e248362c71589f70f8f22ad4d
Story:2004792
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
Flake8 currently ignores the following errors:
H233: Python 3.x incompatible use of print operator
H236: Python 3.x incompatible __metaclass__
H238: Old style class declaration, use new style
Enable them for python3 compability
Change-Id: I8959f3a78ce683eb93a16234908662189dd7c8a5
Story: 2004515
Task: 29304
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
Add control and rules files to generate fm-rest-api deb following
StarlingX/MultiOS/Debian Wiki.
Change-Id: Iad365e637269029cf7a371e29362dda0648a1ba9
Story: 2004792
Task: 33571
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
This commit implements the methods PUT and POST in order
to insert and update alarms.
Story: 2004008
Task: 30270
Change-Id: I773e651165b3654684b95463167fc565aef1ffa4
Co-authored-by: Sun Austin <austin.sun@intel.com>
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Sun Austin <austin.sun@intel.com>
Test has been done on Simplex. the fm alarm-list can run
successfully.
Story: 2004008
Task: 30916
Change-Id: I993a52aa97ee8a21a8d04697b690f371d2a3bad5
Signed-off-by: Sun Austin <austin.sun@intel.com>
Without python-devel as build req in the spec if it is build in a mock
transparent build system ussing the CENGN repos:
http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/
outputs/RPMS/std/
inputs/RPMS/
And upstream centos: http://mirror.centos.org/centos/7/os/x86_64/
The specfile is incomplete in build req and fails with:
+ %py2_build_wheel /var/tmp/rpm-tmp.XE1zff: line 32: fg: no job control
This patch fix the issue in the specfile
Closes-Bug: 1828284
Change-Id: I2842d3dd3761d6827e7d1f9563ec92ebe02e10a5
Signed-off-by: VictorRodriguez <vm.rod25@gmail.com>
PyMySQL is required by oslo_db as database
backend.
Story: 2004008
Task: 30661
Change-Id: Ia8e364511081daf4511b75b234cd35b307844503
Suggested-by: Sun Austin <austin.sun@intel.com>
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
This update removes pike and master wheel and/or image files,
as these have been replaced with stable/dev.
Change-Id: I9e1c98c5e5e5e6c0832ed443ad0a35aa4fb30282
Story: 2005248
Task: 30323
Signed-off-by: Don Penney <don.penney@windriver.com>
The jobs are working here but stx-nfv devstack fails in fm-rest-api,
what fun it is to find a transient dependency! fm-rest-api has
apparently never started correctly but we did not properly detect
that until getting the stx-nfv plugin up.
Add requirements.txt and test-requirements.txt, only
test-requirements.txt is directly used by DevStack but WSME
is not a test-only dependency...
Cleanup to follow:
* properly get the dependencies of the service documented for pip
* properly detect when fm-rest-api fails to start under systemd
Change-Id: I91236d2bbb785c75264e8c4772d4ad6dfa45562c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This update supports the migration to stable/dev build streams by
setting up the stable wheels.inc and image build files.
Depends-On: I76f107bd58a6eee716aca69a1c03716b4f491df5
Depends-On: Ib5dc9a7c1d8c37368d073e28d83eeb883766ee3f
Depends-On: I538bae32a68e43d07e5c64ead8e2884204509194
Story: 2005248
Task: 30149
Signed-off-by: Don Penney <don.penney@windriver.com>
Change-Id: I733b44b5d6bbb789c92e10ea8606a4f44d0d6f88
Co-authored-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
Issue:
for the alarm_show/alarm_delete/event_show api, if the input UUID
string is not valid, http server side will return error code 500
(Internal Server Error), due to the error code is not set correctly.
Solution:
Correct the error code in server, and add client code to handle
"HTTP 404 - Not Found" error code correctly.
Test:
Run "fm alarm-show/alarm-delete/event-show" with valid/invalid
UUID, and the response is correct. For invalid UUID, response
string will like below. "xxx" for the invalid UUID string.
"Alarm not found: xxx"
"Event log not found: xxx"
Closes-Bug: 1806927
Change-Id: I8d17c5bc55733f269d875ae835ab6295fed4d899
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit adds the required files to build the
docker image that will be used for enabling fm-rest-api as
a service in a container.
Story: 2004008
Task: 28874
Depends-On: https://review.openstack.org/635695/
Change-Id: I87900fcd939024dffc41869cf62c1dd29d5c1f90
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
Include the optional “expand” option to the get list for alarms and
events so the entire set of data can be returned and not just a
subset. “expand” is and optional parameter and defaults to False.
Story: 2004818
Task: 29096
Change-Id: Ife3b900d90c56564e9aeaa820e57f69d15194eb3
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
Closes-Bug: 1789979
fm-rest-api returns json format message for the correct api
access. For the invalid api access, the message is with html
format, need add wrap_app to convert it to json format.
Fix:
The implementation code is copied from upstream Ironic API,
and minor modification to pass tox pep8 check.
Also remove "x" attribute for the py file.
Test:
Pass build and multi node deploy test. Confirmed the return
message is json format.
Change-Id: I36fa89b82377d52008a467316c42c06caa65cd90
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This update adds hooks to the spec files for the following packages
to generate wheels for the python modules:
- fm-api
- fm-common
- fm-rest-api
- python-fmclient
Change-Id: I0542650b52b9c5b0627023a2ce1996176135411d
Story: 2003907
Task: 27525
Signed-off-by: Don Penney <don.penney@windriver.com>
The fm-rest-api setup.py and fm-mgr spec file have incorrect
License.
This update changes the license to Apache-2.0 in setup.py and
and the spec file.
Change-Id: Id923baac0c54fb1feb38069dad73dfd13dbf1d39
Signed-off-by: Tao Liu <tao.liu@windriver.com>
The fm-rest-api and python-fmclient packages have incorrect License
in the PKG-INFO and spec files.
This update changes the license to Apache-2.0 in the PKG-INFO and
spec files.
Change-Id: I012c87818d87d1f55032241cd15ff90ad82ef661
Signed-off-by: Tao Liu <tao.liu@windriver.com>
Create fault management REST API service
Create fault management client and CLI shell
Add a python extension for fault management application APIs
Update fault management python APIs to use the python extension
Update fault manager to retrieve the SNMP configuration from the config file
Story: 2002828
Task: 22747
Depends-On: https://review.openstack.org/#/c/592176/
Change-Id: I888d8d23edf75d05d51594ccca55570ae366c848
Signed-off-by: Tao Liu <tao.liu@windriver.com>