The Debian packaging has been changed to reflect all the
git commits under the directory, and not just the commits
to the metadata folder.
This ensures that any new code submissions under those
directories will increment the versions.
Test Plan:
PASS: build-pkgs -p sm-common
PASS: build-pkgs -p sm-db
PASS: build-pkgs -p sm
PASS: build-pkgs -p sm-api
PASS: build-pkgs -p sm-client
PASS: build-pkgs -p sm-tools
PASS: build-pkgs -p stx-ocf-scripts
Story: 2010550
Task: 47341
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I54cde0fe252c3bcef669969a1b0675a2df8b3d69
Make sure that the python is installed correctly.
Test Plan
PASS Build and test ISO.
Story: 2009101
Task: 44678
Signed-off-by: Chuck Short <charles.short@windriver.com>
Change-Id: I6ab99380a8a0a0be960bcf2c6f5b0a97463ff146
Similar to how PEP479 was handled on config[1].
Instances of "raise StopIteration" were changed to
a plain 'return' statement in order to avoid breaking
the existing logic.
CentOS 7 tests:
PASS: Build & install
PASS: Successful Bootstrap
Debian Bullseye tests:
PASS: Build & install
PASS: Successful Bootstrap
[1] https://review.opendev.org/c/starlingx/config/+/825447
Story: 2009101
Task: 44513
Signed-off-by: Matheus Machado Guilhermino <Matheus.MachadoGuilhermino@windriver.com>
Change-Id: Ibe4717e64fcee159c1bc4a17acf623adbfae3908
Remove the deprecated openstack.common.importutils
in favor or oslo_utils.importutils
Story: 2006796
Task: 42848
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I9220e22b8db6c6330ca26ba9bb7a8569527826e0
(cherry picked from commit 8655ae2aa1)
StringIO was moved in Python3.
Use StringIO from six to maintain compatibility with python2
and python3.
Story: 2006796
Task: 42816
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: Ib698aa4e5815ea74e9c73c8579f95a9b411d3010
(cherry picked from commit 144f6f8113)
- Use six.moves for urllib2
- Use six.moves.xmlrpc_client
- Use six.moves.zip
- Adapt gettextutils
- Fix set() order dismatch for python 2/3
- Change dict key to list
Test:
- Build RPM with applied changes.
- Installed simplex controller checked to see if sm-api was running.
Story: 2006796
Task: 42388
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I29a81755f732b55f67321748604b2e5d951935c9
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
(cherry picked from commit cdc4757a46)
The rootwrap code dates back to openstack projects maintained
common code and was later replaced by oslo.rootwrap.
Remove openstack.commmon.rootwrap code since it was not being used
anywhere.
Story: 2006796
Task: 42694
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I0b08117571cd75db17e346c751800c9d3ddfc173
The install_command for docs, newnote and api-ref
needed to be overridden to not use upper constraints.
The bandit requirement needed to be made python3 only.
The bandit scan was failing, so it is now updated to
allow individual bandit failures to be suppressed in tox.ini
Need to include a py file change in order for bandit to be
triggered by zuul.
Partial-Bug: #1907678
Signed-off-by: albailey <Al.Bailey@windriver.com>
Change-Id: Ic73d0ea590ab1b7857f7275fa9c71828b0d343ee
Update remaining StarlingX packages with hardcoded TIS_PATCH_VER to
use PKG_GITREVCOUNT where possible, with offsets as needed to ensure
the version is incremented above the hardcoded version.
Story: 2008455
Task: 41447
Signed-off-by: Don Penney <don.penney@windriver.com>
Change-Id: Idf5ef476192cdf4923d6c903f1a15e03cfe9d03f
The linters in the Opensuse build service are failing because sm_client has
unneeded python shebangs in the code. This is because a python source code
file that is not intended to be executed shouldn't include this shebang.
Also, the linter fails as `/usr/bin/env python` is used causing that the
dependency discovery tool fails. It is safe to use `/usr/bin/python` as
currently we don't provide any other python version.
Story: 2006508
Task: 36647
Change-Id: If3f83b9562414c3392515828a3c716a5bc23015d
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
Flake8 is failing due to bugbear updating with new error codes:
B009: Do not call getattr with a constant attribute value
B010: Do not call setattr with a constant attribute value
Fix these errors by using normal property access instead
Change-Id: Ib857d229ae86e88cb5dbf69e826b25d6018c8547
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
Flake8 currently ignores do not use mutable default arguments error
Enable B006 for more thorough testing of code
Change-Id: I5b08a56f945158c3b3c23574c048363e59da6001
Story: 2004515
Task: 30172
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
below issures are removed from ignore cases:
E114 indentation is not a multiple of four (comment)
E116 unexpected indentation (comment)
E121 continuation line under-indented for hanging indent
E122 continuation line missing indentation or outdented
E123 closing bracket does not match indentation of opening bracket's line
E124 closing bracket does not match visual indentation
E125 continuation line with same indent as next logical line
E126 continuation line over-indented for hanging indent
E127 continuation line over-indented for visual indent
E128 continuation line under-indented for visual indent
E129 visually indented line with same indent as next logical line
E131 continuation line unaligned for hanging indent
E201 whitespace after '('
E228 missing whitespace around modulo operator
E231 missing whitespace after ','
E241 multiple spaces after ':'
E251 unexpected spaces around keyword / parameter equals
E265 block comment should start with '#'
E271 multiple spaces after keyword
E302 expected 2 blank lines, found 1
E303 too many blank lines
E305 expected 2 blank lines after class or function definition, found 1
E704 multiple statements on one line (def)
E713 test for membership should be 'not in'
E714 test for object identity should be 'is not'
E722 do not use bare except'
E731 do not assign a lambda expression, use a def
E999 SyntaxError: invalid syntax (this is likely python3)
F401 <foo> imported but unused
F841 local variable 'foo' is assigned to but never used
H201: no 'except:'
H233: Python 3.x incompatible use of print operator
B001 Do not use bare `except:`
B004 Using `hasattr(x, '__call__')` to test
if `x` is callable is unreliable.
B305 `.next()` is not a thing on Python 3. Use the `next()` builtin.
B306 `BaseException.message` has been deprecated as of Python 2.6
and is removed in Python 3.
B007 Loop control variable 'key' not used within the loop body.
remain below issues in ignores:
E402 module level import not at top of file
./service-mgmt-api/sm-api/sm_api/cmd/__init__.py:25
Hxxx since which are related with document format
F811 redefinition of unused '<foo>' from line <x>
./service-mgmt-tools/sm-tools/sm_tools/sm_configure.py:18
F821 undefined name 'e'
./service-mgmt-api/sm-api/sm_api/common/utils.py:448
B006 Do not use mutable data structures for argument defaults.
./service-mgmt-api/sm-api/sm_api/common/service.py:59
B008 Do not perform calls in argument defaults.
./service-mgmt-api/sm-api/sm_api/openstack/common/timeutils.py:117
Test have been done:Build,Deploy,some smc command,such as smc service-list,
smc service-show, sm-dump, etc
Story: 2003430
Task: 26524
Change-Id: I3e2a4a31f87e3ff66cfce86f54285e830ee1c3dc
Signed-off-by: Sun Austin <austin.sun@intel.com>
This update adds hooks to the spec files for the following packages
to generate wheels for the python modules:
- sm-api
- sm-client
- sm-tools
Change-Id: If6ebbdaaad5ee7623cbbaa07b48d216461a16dec
Story: 2003907
Task: 27527
Signed-off-by: Don Penney <don.penney@windriver.com>
change x.next() to next(x)
and
add __next__() for class
Story: 2003430
Task: 26519
Change-Id: I4cda6f1d679e05b7f533b94840e0eb561213aa76
Signed-off-by: Sun Austin <austin.sun@intel.com>
The W291,W292,W391,W503,W601 warnings were fixed and
tox.ini updated accordingly.
Story: 2002803
Task: 26911
Change-Id: I1e5f0b1f72b06ad8b5cac07921e9d14171623ba0
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
The ConfigParser module in python 2 has been renamed to configparser
in Python 3.
Story: 2003430
Task: 26335
Change-Id: Ie4b29c44f90cc4feaf7f66f2a855fde3a222e058
Signed-off-by: zhangyangyang <zhangyangyang@unionpay.com>
In Python 3 print is a function.
Especially for multiple string print, need to import
print_function from __future__.
Story: 2003430
Task: 24915
Signed-off: zhangyangyang <zhangyangyang@unionpay.com>
Change-Id: I40ae72b8efb7b342489ad2191ad02b0a5fb2898f