Exemplo n.º 1
0
from common_utils import xlogging

_logger = xlogging.getLogger(__name__)


class Foo(object):

    def __init__(self, args_dict, raw_input):
        _logger.info('Foo __init__ {} {}'.format(args_dict, raw_input))

    def hello(self, args_dict, raw_input):
        _logger.info('xxxx', args_dict, raw_input)
        return 'hi, ', b''

    def get_name(self, args_dict, raw_input):
        _logger.info('get_name', args_dict, raw_input)
        return '1cc', b''


def foo(args_dict, raw_input):
    _logger.info('foo {} {}'.format(args_dict, raw_input))
    return 'foo', b''
Exemplo n.º 2
0
# coding:utf-8
import subprocess
import os
import re
import sys

from common_utils import xlogging, loadIce

import platform

_logger = xlogging.getLogger('register')

cfs_args = {
    'agent_service': {
        'systemd_cfg': "LinuxAgentService.service",
        "initd_cfg": "LinuxAgentService.initd_cfg",
        "AgentServiceName": 'ClwDRClient',
        "Service_Service": "ClwDRClient.service"
    },
    'set_ip_service': {
        'systemd_cfg': "ip2sys.service",
        "initd_cfg": "ip2sys",
        "AgentServiceName": 'ClwDRIpSvr',
        "Service_Service": "ClwDRIpSvr.service"
    },
    'agent_application': {
        'systemd_cfg': "agent_application.service",
        "initd_cfg": "agent_application.initd_cfg",
        "AgentServiceName": 'agent_application',
        "Service_Service": "agent_application.service"
    }