Renaming a config entry as it causes a name conflict with
the latest version of oslo utils introduced during the stein rebase
Change-Id: Idc581b7dc389b00863461f2b30b7f6ae283ffdc5
Story: 2004765
Task: 28883
Signed-off-by: Tyler Smith <tyler.smith@windriver.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>
Fix: "reduce" issue in
service-mgmt-api/sm-api/sm_api/openstack/common/rpc/impl_zmq.py
- from functools import reduce to support python 3
Fix: "long" issue in
service-mgmt-api/sm-api/sm_api/openstack/common/jsonutils.py
- remove long type if for python 3
- change to six.integer_types
Fix: "funcattrs" issue in
service-mgmt-api/sm-api/sm_api/openstack/common/db/sqlalchemy/session.py
- change f.func_name to f.__name__
Fix: "zip" and "methodattrs" issues in
service-mgmt-api/sm-api/sm_api/common/safe_utils.py
- change zip() to list(zip())
- change function.im_self to function.__self__
Fix: "itertools" issue in
service-mgmt-api/sm-api/sm_api/openstack/common/log.py
- from six import moves and use moves.filter
Story: 2003430
Task: 26523
Change-Id: I37b47a12a24ef05fb4d57823b2a91086b6ca537f
Signed-off-by: Sun Austin <austin.sun@intel.com>
remove "__metaclass__ = abc.ABCMeta"
and adding decorator "@six.add_metaclass(abc.ABCMeta)" on class
and removing pep8 ignore case
Story: 2003430
Task: 27476
Change-Id: If60b8d5662d9a87b217a9b1d48a2c3e9b037884b
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>
use from six import reraise as raise_
to re-implement raise
Story:2003430
Task:27478
Change-Id: I34373ce7f233f7f908da3d92bcc000a9e924375d
Signed-off-by: Sun Austin <austin.sun@intel.com>
change "except ValueError, e:"
to "except ValueError as e:"
and remove tox H231 from ignore for pep8 check
Story:2003430
Task: 26522
Change-Id: I06c7646c375ada7f8f06f870a7bdb0d7fc282e5a
Signed-off-by: Sun Austin <austin.sun@intel.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 voting linters job will now run pylint on the python code.
All failing pylint codes are currently suppressed.
Further tasks will be created to cleanup those failing tests.
The only code changes were comments which perform inline suppression
of pylint warnings. Those lines are not meant to be fixed since those
imports cannot succeed in a tox env.
Story: 2002803
Task: 26883
Change-Id: I4a25599fb60f58b168dbec001d3f2d24e0e2c235
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
Add logging when a service sm-api request is received.
Change-Id: Ifaf38eeeeeb44110a700976fedc247e30b0c7206
Related-Bug: #1791381
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This decouples the build and packaging of guest-server, guest-agent from
mtce, by splitting guest component into stx-nfv repo.
This leaves existing C++ code, scripts, and resource files untouched,
so there is no functional change. Code refactoring is beyond the scope
of this update.
Makefiles were modified to include devel headers directories
/usr/include/mtce-common and /usr/include/mtce-daemon.
This ensures there is no contamination with other system headers.
The cgts-mtce-common package is renamed and split into:
- repo stx-metal: mtce-common, mtce-common-dev
- repo stx-metal: mtce
- repo stx-nfv: mtce-guest
- repo stx-ha: updates package dependencies to mtce-pmon for
service-mgmt, sm, and sm-api
mtce-common:
- contains common and daemon shared source utility code
mtce-common-dev:
- based on mtce-common, contains devel package required to build
mtce-guest and mtce
- contains common library archives and headers
mtce:
- contains components: alarm, fsmon, fsync, heartbeat, hostw, hwmon,
maintenance, mtclog, pmon, public, rmon
mtce-guest:
- contains guest component guest-server, guest-agent
Story: 2002829
Task: 22748
Depends-On: https://review.openstack.org/603435
Change-Id: I1a66c28bfa592d8034074a18e2328f69122da89b
Signed-off-by: Jim Gauld <james.gauld@windriver.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>
xrange is not defined in python3.
Rename xrange() to range().
Story: 2003430
Task: 25738
Change-Id: I267864d9b0ff9134fadc0864bee7f9d7095eb621
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
sm-api relys on sm service to provide service.
This change ensure sm-api start provide service after sm runtime
db is created.
Story: 2002988
Task: 23002
Change-Id: I3f1a970d5a5b8d7b77e6014008af39d36c55d6af
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This fixes the issue of unrecoverable sm-api process failure leading to
constant controller degrade in ipv6 system.
Story: 2002838
Task: 22757
Change-Id: If5381e583174cce63cb2734a46e094f401d5172b
Signed-off-by: Jack Ding <jack.ding@windriver.com>
Add full support for Active/Active redudancy model
1. services could have enable dependency to services in other service groups
(standby group)
2. An active/active service failure will degraded the service group it is in
3. A failure of active/active service would not prevent a swact
4. Locking a controller that is sole active/active service
provider will be rejected. But lock with force option will still proceed
to lock the node.
5. sm-api bind to port 7777 on mgmt interface. (was localhost:7777)
Change-Id: I6f0354e1e8fc606c6f3b8b33e3ab862b47824232
Signed-off-by: Jack Ding <jack.ding@windriver.com>