X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=cmframework%2Fsrc%2Fcmframework%2Fapis%2Fcmupdate.py;fp=cmframework%2Fsrc%2Fcmframework%2Fapis%2Fcmupdate.py;h=b7aeacefb75db8a6d964ee1346f3ffb1a9eb88f7;hb=c389bdee7b3845b55f443dbf04c0ce4083a55886;hp=0000000000000000000000000000000000000000;hpb=5030f0c004701dd422c78c71c014ef60f48139fc;p=ta%2Fconfig-manager.git diff --git a/cmframework/src/cmframework/apis/cmupdate.py b/cmframework/src/cmframework/apis/cmupdate.py new file mode 100644 index 0000000..b7aeace --- /dev/null +++ b/cmframework/src/cmframework/apis/cmupdate.py @@ -0,0 +1,35 @@ +# Copyright 2019 Nokia + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging + +from cmframework.lib.cmupdateimpl import CMUpdateImpl + + +class CMUpdate(object): + def __init__(self, plugins_path, server_ip='config-manager', server_port=61100, + client_lib_impl_module='cmframework.lib.CMClientImpl', verbose_logger=None): + logging.info('CMUpdate constructor, plugins_path is %s', plugins_path) + + self._update_lib = CMUpdateImpl(plugins_path, + server_ip, + server_port, + client_lib_impl_module, + verbose_logger) + + def update(self, confman=None): + self._update_lib.update(confman) + + def wait_activation(self): + self._update_lib.wait_activation()