Refactor the code 14/1014/3
authorRoni Riska <roni.riska@nokia.com>
Thu, 26 Sep 2019 05:20:44 +0000 (08:20 +0300)
committerRoni Riska <roni.riska@nokia.com>
Thu, 26 Sep 2019 07:28:50 +0000 (10:28 +0300)
commitfc77ebb24a8627ccfb18edd8b5dbc038da475eab
tree17cbb5ff676938e7dc5411bbe5b387d59c79f7da
parent9a9ecfe2f3f3592c07c24e502b4ce252cf3bd377
Refactor the code

Multiple code refactorings to make the code
simpler and increase the unit testing coverage.

* Golint findings are fixed.
* Xapp query function name changed from status to
  config.

The functionality is slightly changed so that
  - Vespa is started only after the xapp notification
    subscription is successful and the vesmgr has received
    the current xapp configuration from the xapp manager.
  - The vesmgr goes to the main loop after that.

Change-Id: Ie2675c0543d4e4ce0a60b92a6c06a79b9e2cb2cd
Signed-off-by: Roni Riska <roni.riska@nokia.com>
13 files changed:
cmd/vesmgr/config.go
cmd/vesmgr/config_test.go
cmd/vesmgr/httpserver.go
cmd/vesmgr/httpserver_test.go
cmd/vesmgr/main.go
cmd/vesmgr/subprocess.go [new file with mode: 0644]
cmd/vesmgr/subprocess_test.go [new file with mode: 0644]
cmd/vesmgr/subscribexAPPNotifications.go
cmd/vesmgr/subscribexAPPNotifications_test.go
cmd/vesmgr/vesmgr.go
cmd/vesmgr/vesmgr_queryxappconfig_test.go [moved from cmd/vesmgr/vesmgr_queryxappssttus_test.go with 67% similarity]
cmd/vesmgr/vesmgr_test.go
container-tag.yaml