Commit Graph

58 Commits

Author SHA1 Message Date
junfeng-li 54ceb83726 Fix swact back after legacy upgrade
This commit is to change the swact precheck logic. The new
logic will unblock the swact precheck for host state sync state
if the USM endpoint is not present. This change is needed for
the release that doesn't have USM endpoint present.

Test Plan:

PASS: swact back to controller 0 after legacy upgrade to 24.09
PaSS: swact between controllers in 24.09

Task: 49826
Story: 2010676
Change-Id: I6824f00589057f4d48c8df04425431cb22361e8e
Signed-off-by: junfeng-li <junfeng.li@windriver.com>
2024-04-05 18:06:07 +00:00
junfeng-li fc8b75c6f9 Fix USM endpoint append error
This is to fix the USM endpoint URL not appended properly
using .join() function.

The way .join() was used only append the endpoint resource
to a empty string.

Test Plan:

PASS: Run the host-swact

Depends-on: https://review.opendev.org/c/starlingx/update/+/911003

Task: 49660
Story: 2010676
Change-Id: Icf47494843d7ea6c9fcd73e9256d9be352d8f76f
Signed-off-by: junfeng-li <junfeng.li@windriver.com>
2024-03-04 21:49:08 +00:00
junfeng-li 23f48bd545 Deploy state sync on swact
This commit is to ensure both controllers
deployment state is in synced before host
swact during platform upgrade.

If the USM deploy is not started, this host swact
pre-check is always passed.

During the pre-swact check, the SM calls
USM REST API endpoint to get the controller
sync status. If the controllers deployment state
is not in sync, the host swact is stopped.

Depends-on: https://review.opendev.org/c/starlingx/update/+/906005

Test Plan:

PASS: executed host swact when controllers are in sync
PASS: executed host swact when controllers are not in sync

Task: 49425
Story: 2010676

Change-Id: I8d262a731583f691fd0d85a33ddebcbb12f549e8
Signed-off-by: junfeng-li <junfeng.li@windriver.com>
2024-02-28 20:07:48 +00:00
Luis Sampaio 5d4ba83910 Update debian package versions to use git commits
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
2023-02-10 10:14:48 -08:00
Zuul 48d17d8059 Merge "Debian: Remove conf files from etc-pmon.d" 2022-09-30 19:10:32 +00:00
Charles Short e21e923161 debian: Remove package preset install for ha
Remove the installation of per-package preset installs
since they are centrally managed now by the ISO install
for the following packages:

- sm-api
- sm-common
- sm-eru
- sm

Story: 2009968
Task: 46406

Test Plan

PASS Build package
PASS Build ISO
PASS Check for non-existant preset file in /etc/systemd/system-preset

Depends-On: https://review.opendev.org/c/starlingx/integ/+/853653

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I537a013c77c7603e48cbf92837a4174282d70032
2022-09-27 08:16:38 +00:00
Leonardo Fagundes Luz Serrano f58f11ccba Debian: Remove conf files from etc-pmon.d
Removed conf files from /etc/pmon.d/
as they are being moved to another location.

This is part of an effort to allow pmon conf files
to be selected at runtime by kickstarts.

The change is debian-only, since centos support
will be dropped soon.
Centos' pmon conf files remain in /etc/pmon.d/

Test Plan:
PASS - deb doesn't install anything to /etc/pmon.d/
PASS - rpm files unchanged
PASS - AIOSX unlocked-enabled-available
PASS - Standard 2+2 unlocked-enabled-available

Story: 2010211
Task: 46304

Depends-On: https://review.opendev.org/c/starlingx/metal/+/855095

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: Ie2f8e73f8664746d0213e98bba17e56d98d93b4f
2022-09-26 13:40:41 +00:00
Leonardo Fagundes Luz Serrano 199c1a8ba8 Duplicate pmon.d conf files to another location
Created a duplicate install of /etc/pmon.d/*.conf files
to /usr/share/starlingx/pmon.d/

This is part of an effort to allow pmon conf files
to be selected at runtime by kickstarts.

Test Plan:
PASS: duplicate conf on deb

Story: 2010211
Task: 46114

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: Ia3774ac59b1df40aa1726bb182390b4b58812141
2022-08-30 16:26:27 -03:00
Dan Voiculeasa 924c088f3a py3: Fix sm-api communication
mtcAgent get response code 500 from sm-api.

Tests on AIO-DX:
CentOS:
PASS: unlocked enabled available controller-1
Debian:
integration not far enough to test controller-1 unlock
PASS: mtcAgent gets a proper response from sm-api

Story: 2009968
Task: 45504
Closes-Bug: 1976515
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I5912f8d506d220775e2346f4b8771758cf818e3c
2022-06-02 12:18:56 +00:00
Chuck Short c9a80e6b5f debian: Fix service-mgmt-api packaging issues
- Removed unneeded dependencies.
- Install systemd services in the correct directory.
- Enabled systemd preset so that the packaging is starting
  correctly when the server boots.

Test Plan
PASS Build and test ISO.
PASS Check sm service has started.

Story: 2009101
Task: 44678

Depends-On: https://review.opendev.org/c/starlingx/integ/+/831950

Signed-off-by: Chuck Short <charles.short@windriver.com>
Change-Id: I05f7f559f14892eaede069930398359b3d26f6e5
2022-03-08 15:50:56 +00:00
Zuul 4b612d1f42 Merge "Revert "Fix failing sm services on Debian"" 2022-03-02 14:04:07 +00:00
Dan Voiculeasa 38f9923ebb Revert "Fix failing sm services on Debian"
This reverts commit 8b2820f90f.

This introduces a build error when building sm, due to sm-db
dependency. When installing sm-db the shared library is now
moved to another location. Linking will fail when building.

/usr/bin/ld: cannot find -lsm_db
collect2: error: ld returned 1 exit status

Story: 2009101
Task: 44597
Change-Id: I58796e3d285777e5e5b3cf7123acd8bfbf6e6332
2022-03-02 08:59:04 +00:00
Zuul fcd6e9de94 Merge "Fix failing sm services on Debian" 2022-03-01 13:53:45 +00:00
lbonatti 8b2820f90f Fix failing sm services on Debian
Modified sm to address the following failing
services on Debian:

sm.service
sm-eru.service
sm-watchdog.service
sm-shutdown.service
sm-api.service

Applied fix:
- Included modified .service files for debian
directly into into the deb_folder.
- Changed the script file to set the environmental
variable LD_LIBRARY_PATH to the path of the
libsm_db and libsm_common libs.
- Included "override_dh_installsystemd" section
to rules in order to install services.
- Included postinst file to move the lib files
and to start two services.

Test Plan:

PASS: Package installed and ISO built successfully.
PASS: Services are on the expected state after iso install.
PASS: Services are running after bootstrap on Debian.
PASS: CentOS sm package is built and installed successfully

Story: 2009101
Task: 44597

Signed-off-by: lbonatti <LuizEduardo.Bonatti@windriver.com>
Change-Id: Iaa6e5087d6abe89b4fbfea464b2a19521faaa868
2022-02-28 09:20:36 -03:00
Matheus Machado Guilhermino 6ffad90d16 Handle PEP479 issues on ha
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
2022-02-18 14:45:44 -03:00
Zuul f9df947772 Merge "Add debian package for service-mgmt-api" 2021-11-05 12:34:43 +00:00
Leonardo Fagundes Luz Serrano f30223d172 Add debian package for service-mgmt-api
Add debian packaging infrastructure for service-mgmt-api
to build a debian package.

Story: 2009101
Task: 43642

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: Icc575ebfce60550953ea365a4d0a3c83183eb8e7
2021-11-03 13:45:22 +00:00
Bernardo Decco 43ca8bc29c Re-enable important py3k checks for ha
Re-enabling some of the disabled tox warnings present on
the pylint.rc file

Re-enabling:

print-statement (E1601)

Test Plan: Sanity test run on AIO-SX:

PASS: test_system_health_pre_session[pods]
PASS: test_system_health_pre_session[alarms]
PASS: test_system_health_pre_session[system_apps]
PASS: test_wr_analytics[deploy_and_remove]
PASS: test_horizon_host_inventory_display
PASS: test_lock_unlock_host[controller]
PASS: test_pod_to_pod_connection
PASS: test_pod_to_service_connection
PASS: test_host_to_service_connection

Story: 2006796
Task: 43434
Signed-off-by: Bernardo Decco <bernardo.deccodesiqueira@windriver.com>
Change-Id: I4b8b1dcec40d1255edccaa8873af558c382a4f67
2021-10-28 17:10:41 -03:00
Charles Short 4d9b787546 py3: Fix exception types
Except keywords expects a tuple containing only base classes,
or a base class as the exception type in Python3.
This is compatible with Python2.

Convert lists to tuples, and expand nested tuples.
Suppress pylint warnings.

This was taken from d41f3fe19939f1759ca3cf73874724bd75eebe43
in the starlingx/config repo.

Story: 2006796
Task: 42866

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I129302b5a6199b705b3533ffb77e7700e815df2f
(cherry picked from commit 702ea92596)
2021-08-17 11:41:37 -04:00
Charles Short 8a2bf269ba py3: use real division operator
"/" operator using integers as both left-hand and right-hand
expressions returns floor division in python2 and real
division in python3.

Use "//" instead to do real division for both python versions.

Story: 2006796
Task: 42817

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: Id8ac605d0184e70aa92717d8d3ce97bf8b7922cf
(cherry picked from commit bcf4a4915f)
2021-08-12 08:57:13 -04:00
Zuul 46a7ccbb6c Merge "Python 3: Enable sm-api to work after unlock" 2021-08-12 12:30:47 +00:00
Charles Short 1f48745689 Fix python3 compatibility
- 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)
2021-08-10 21:19:25 -04:00
Mihnea Saracin 0db63883c0 Python 3: Enable sm-api to work after unlock
The "min()" function works for None arguments
in Python 2 but in Python 3 raises an error.
We add a check to ensure that the function is not
called with the None argument in Python 3.

Story: 2006796
Task: 42388
Depends-On: I29a81755f732b55f67321748604b2e5d951935c9
Change-Id: I2199e0b87d342cec305edbb10483c6c038ad591c
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
(cherry picked from commit f2186d04c0)
2021-07-26 12:54:57 -04:00
Don Penney df739b210e Add auto-version for remaining stx/ha packages
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
2020-12-17 13:27:02 -05:00
Abraham Arce 03b3f990ea openSUSE: Runtime Dependencies
Resolve runtime dependencies for the following service manager
components:

- sm-client
- sm-tools
- sm-api

High availability OBS workspace has been moved to xe1gyq home
project [0], adding repository
Cloud_StarlingX_2.0_openSUSE_Leap_15.1 [1] in order to:

- allow all succesfull packages appear under xe1gyq
  repository [2].
- automatically include other flock dependencies
  (e.g. mtce-devel).

Refer to the following OBS workspaces to verify all service
management packages have built successfully under repository
Cloud_StarlingX_2.0_openSUSE_Leap_15.1:

- https://build.opensuse.org/package/show/home:xe1gyq/sm-db
- https://build.opensuse.org/package/show/home:xe1gyq/sm-common
- https://build.opensuse.org/package/show/home:xe1gyq/sm
- https://build.opensuse.org/package/show/home:xe1gyq/sm-client
- https://build.opensuse.org/package/show/home:xe1gyq/sm-tools
- https://build.opensuse.org/package/show/home:xe1gyq/sm-api

[0] https://build.opensuse.org/project/show/home:xe1gyq
[1] https://build.opensuse.org/repositories/home:xe1gyq
[2] https://download.opensuse.org/repositories/home:/xe1gyq/

Depends-On: https://review.opendev.org/#/c/679686

Story: 2006684
Task: 36968
Task: 36969
Task: 36970

Change-Id: I0a21652fff83b5da8acdfb0191df87165b88389e
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-10-09 10:05:54 -05:00
Abraham Arce f38de3f45f openSUSE: Open Build Service Artifacts
OBS is a generic system to build and distribute binary packages
from sources [0], StarlingX OBS Project:

- Cloud:StarlingX:2.0 [1]

Build Service Management uses Open Build Service (OBS) with the
following base artifacts under Service Management repository:

- Specfiles
- Changelogs
- Rpmlintrcs

The following components are included and succesfully building,
(with their source OBS repository):

- sm        [2]
- sm-common [3]
- sm-db     [4]
- sm-api    [5]
- sm-client [6]
- sm-tools  [7]

The following considerations are taken for Gerrit files:

- Added %changelog directive to all specfiles

The following considerations are taken for OBS _service files:

- Added parameter "extract" to get spec, changes and rpmlintrc files.
- All component version standardized to 1.0.0

[0] openbuildservice.org
[1] https://build.opensuse.org/project/show/Cloud:StarlingX:2.0
[2] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm
[3] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-common
[4] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-db
[5] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-api
[6] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-client
[7] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-tools

Story: 2006508
Task: 36495
Task: 36496
Task: 36497
Task: 36498
Task: 36534
Task: 36794

Change-Id: I06a7e132de4892b846d99977ff1bfc5bf240ade4
Co-authored-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-10-09 10:05:20 -05:00
Zuul c6748557ef Merge "Fix Flake8 Bugbear Errors" 2019-04-23 18:42:01 +00:00
Tyler Smith 160ef92b44 Rename config entry to work with newest stein oslo utils package
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>
2019-04-17 15:24:55 +00:00
Eric Barrett 24c42133f8 Fix Flake8 Bugbear Errors
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>
2019-04-15 17:06:14 -04:00
Eric Barrett 687ed8c747 Enable Do not use Mutable Default Args Error
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>
2019-04-15 12:53:36 -04:00
Sun Austin da53f143ee Fix flake8 errors and disable ignore case
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>
2018-11-07 08:12:37 +08:00
Sun Austin ec02214db7 Fix: others issues for Python 2/3 compatible code.
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>
2018-10-27 09:30:19 +08:00
Sun Austin 6753274b28 Fix: "metaclass" issues for Python 2/3 compatible code.
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>
2018-10-26 11:49:16 +08:00
Sun Austin d9c7f0bc2f Fix types issue for Python 2/3 compatible code.
replace types.NoneType  with type(None)
replace types.DictType with dict

Story: 2003430
Task: 27481

Change-Id: I835b1c086267b05bedb454a0d2eaaeef58254dae
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-10-26 11:49:16 +08:00
Don Penney b4049622ec Add hooks for python wheel generation
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>
2018-10-24 17:13:06 +00:00
Sun Austin de91fb2ac1 Fix urllib import issue for Python2/3 compatible code.
change urlparse to 'from six.moves.urllib.parse import urlparse'
and remove obsolete code

Story:2003430
Task:27479

Change-Id: I38e75f5faa55046517f1e479b18ebcef0304e471
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-10-24 08:39:08 +08:00
Sun Austin 1477d25d55 Fix: "raise" issues for Python 2/3 compatible code.
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>
2018-10-24 08:39:08 +08:00
Sun Austin 4fe73f515d Fix: "except" issues for Python 2/3 compatible code.
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>
2018-10-22 11:49:35 +08:00
Sun Austin f2a6d355a9 Fix next issue for Python 2/3 compatible code.
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>
2018-10-22 09:51:19 +08:00
Sun Austin 7816995e87 Fix filter issue for Python 2/3 compatible code.
Change-Id: I5894ed2a2be0ca7fc14004be3059033df7281791
Story: 2003430
Task: 26520
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-10-15 13:00:51 +08:00
Sun Austin 481b44f8a7 Fix unicode issue for Python 2/3 compatible code.
replace unicode with six.text_type

Story: 2003430
Task: 26517

Change-Id: I43db85ad34defeb708da1ad6c6c1ccce730818eb
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-10-10 11:07:12 +08:00
Sun Austin f21e0c13d7 Fix basestring issue for Python 2/3 compatible code.
replace basestring with six.string_types
need python-six module

Story: 2003430
Task: 26518

Change-Id: If8864a1af26274211d8d0e125071794d18dfed01
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-10-08 19:11:28 +08:00
Erich Cordoba 54f4802bb1 Unsupress pylint warnings.
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>
2018-10-04 14:19:31 -05:00
Al Bailey 6c5b844111 Adding pylint target to stx-ha
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>
2018-10-04 09:20:06 -05:00
Zuul 81060ae8ff Merge "Python 3 compatibility: convert ConfigParser to configparser." 2018-10-02 17:03:46 +00:00
Zuul fc4fa1c048 Merge "Fix dict related issues for Python 2/3 compatible code" 2018-10-02 15:54:30 +00:00
Bin Qian a2e8b67fc8 Add logging when a sm-api request received
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>
2018-09-27 16:11:56 +00:00
Sun Austin 5c0dcd6e4c Fix dict related issues for Python 2/3 compatible code
Story: 2003430
Task: 26353

Change-Id: Ic673136ece7f0a16177cc6a96377456d127e55bf
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-09-26 11:27:54 +08:00
melissaml 3ee0e68559 Fix a typo
Change-Id: I3505857116a0b85e3d6427e010d7eb94acf6841c
2018-09-23 01:53:28 +08:00
Jim Gauld 0ae072e1ad Decouple Guest-server/agent from stx-metal
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>
2018-09-18 12:53:12 -04:00