Add logging into human API call

Change-Id: Iafcfb0ad429c720088836a911f8e03a0bc35e8ed
This commit is contained in:
Ilya Shakhat 2017-10-05 12:04:20 +02:00
parent cc582c38e2
commit 7782a03a43
1 changed files with 5 additions and 0 deletions

View File

@ -11,6 +11,7 @@
# under the License.
import inspect
import logging
import re
from os_faults.api import error
@ -18,6 +19,8 @@ from os_faults.api import node_collection as node_collection_pkg
from os_faults.api import service as service_pkg
from os_faults.api import utils
LOG = logging.getLogger(__name__)
"""
Human API understands commands like these (examples):
* restart <service> service [on (random|one|single|<fqdn> node[s])]
@ -137,3 +140,5 @@ def execute(destructor, command):
fn = getattr(nodes, action)
fn(**kwargs)
LOG.info('Command `%s` is executed successfully', command)