当前位置: 首页>>代码示例>>Python>>正文


Python logger.setup_logging函数代码示例

本文整理汇总了Python中vmware.common.logger.setup_logging函数的典型用法代码示例。如果您正苦于以下问题:Python setup_logging函数的具体用法?Python setup_logging怎么用?Python setup_logging使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setup_logging函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, nvp_controller=None):

        super(TransportNode, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'nvp_transport_node_schema.TransportNode'
        self.set_create_endpoint('transport-node')

        if nvp_controller != None:
            self.set_connection(nvp_controller.get_connection())
开发者ID:carriercomm,项目名称:MyProject,代码行数:9,代码来源:nvp_transport_node.py

示例2: __init__

    def __init__(self, neutron=None):
        super(VSMRegistration, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'registration_schema.Registration'

        if neutron is not None:
            self.set_connection(neutron.get_connection())

        self.set_create_endpoint('/element-managers/vcns')
开发者ID:carriercomm,项目名称:MyProject,代码行数:9,代码来源:vsm_registration.py

示例3: __init__

 def __init__(self, vsm=None):
     """ Constructor to create ServiceManager object
     @param vsm object on which ServiceManager has to be configured
     """
     super(ServiceManager, self).__init__()
     self.log = logger.setup_logging(self.__class__.__name__)
     self.schema_class = 'service_manager_schema.ServiceManagerSchema'
     self.set_connection(vsm.get_connection())
     self.set_create_endpoint("/si/servicemanager")
     self.id = None
开发者ID:carriercomm,项目名称:MyProject,代码行数:10,代码来源:service_manager.py

示例4: __init__

 def __init__(self, vsm=None):
     """ Constructor to issue force sync on replicator
     @param vsm object on which IPSet has to be configured
     """
     super(ReplicatorForceSync, self).__init__()
     self.log = logger.setup_logging(self.__class__.__name__)
     self.set_connection(vsm.get_connection())
     self.set_create_endpoint("universalsync/sync?action=invoke")
     self.id = None
     self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:10,代码来源:vsm_replicator_force_sync.py

示例5: __init__

    def __init__(self, nvp_controller=None):

        super(LogicalSwitch, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'nvp_logical_switch_schema.LogicalSwitch'

        if nvp_controller != None:
            self.set_connection(nvp_controller.get_connection())

        self.set_create_endpoint('lswitch')
开发者ID:carriercomm,项目名称:MyProject,代码行数:10,代码来源:nvp_logical_switch.py

示例6: __init__

 def __init__(self, vsm=None):
     super(VsmVersion, self).__init__()
     self.log = logger.setup_logging(self.__class__.__name__)
     self.schema_class = 'vsmglobalinfo_schema.VSMGlobalInfoSchema'
     self.set_connection(vsm.get_connection())
     conn = self.get_connection()
     conn.set_api_header("api/1.0/")
     self.set_read_endpoint("appliance-management/global/info")
     self.id = None
     self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:10,代码来源:vsmversion.py

示例7: __init__

 def __init__(self, service=None):
     """ Constructor to create Service object
     @param vsm object on which Service has to be configured
     """
     super(VendorTemplate, self).__init__()
     self.log = logger.setup_logging(self.__class__.__name__)
     self.schema_class = 'vendor_template_schema.VendorTemplateSchema'
     self.set_connection(service.get_connection())
     self.set_create_endpoint("/si/service/" + str(service.id) + "/vendortemplate")
     self.id = None
     self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:11,代码来源:vendor_template.py

示例8: __init__

 def __init__(self, vsm=None):
     """ Constructor to create Service object
     @param vsm object on which Service has to be configured
     """
     super(Service, self).__init__()
     self.log = logger.setup_logging(self.__class__.__name__)
     self.schema_class = 'service_si_schema.ServiceSchema'
     self.set_connection(vsm.get_connection())
     self.set_create_endpoint("/si/service")
     self.id = None
     self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:11,代码来源:service_si.py

示例9: test_attribute_mapping

    def test_attribute_mapping(self):
        self.log = logger.setup_logging(self.__class__.__name__)
        #Attribute map
        attribute_map = {
            'name': 'display_name',
            'summary': 'description',
            'begin': 'start',
            'ipv': 'ip_version',
            'ranges': 'allocation_ranges',
            'dns': 'dns_nameservers',
            'hop': 'next_hop'
        }

        #User dictionary
        py_dict = {'subnets':
                       [{'static_routes': [{'hop': '192.168.10.5', 'destination_cidr': '192.168.10.0/24'}],
                         'ranges': [{'start': '192.168.1.2', 'end': '192.168.1.6'},
                                    {'start': '192.168.1.10', 'end': '192.168.1.100'}],
                         'dns': ['10.10.10.11', '10.10.10.12'],
                         'gateway_ip': '192.168.1.1',
                         'ipv': 4,
                         'cidr': '192.168.1.0/24'},
                         {'cidr': '192.175.1.0/24'}],
                         'name': 'TestIPPool-1-2091',
                         'summary': 'Test IPPool'}

        self.log.debug("User dictionary: %s" % py_dict)

        #Convert user dictionary to product expected form using map_attributes function
        py_dict = utilities.map_attributes(attribute_map, py_dict)

        #Dictionary in product expected form
        self.log.debug("Dictionary in product expected form:: %s" % py_dict)

        self.assertTrue("name" not in py_dict.keys())
        self.assertTrue("display_name" in py_dict.keys())
        self.assertEqual(py_dict["display_name"], "TestIPPool-1-2091")
        self.assertTrue("summary" not in py_dict.keys())
        self.assertTrue("description" in py_dict.keys())
        self.assertEqual(py_dict["description"], "Test IPPool")

        #Convert product expected dictionary in user dictionary form using map_attributes function
        py_dict = utilities.map_attributes(attribute_map, py_dict, reverse_attribute_map=True)

        #Dictionary in user expected form
        self.log.debug("Dictionary in user expected form:: %s" % py_dict)

        self.assertTrue("display_name" not in py_dict.keys())
        self.assertTrue("name" in py_dict.keys())
        self.assertEqual(py_dict["name"], "TestIPPool-1-2091")
        self.assertTrue("description" not in py_dict.keys())
        self.assertTrue("summary" in py_dict.keys())
        self.assertEqual(py_dict["summary"], "Test IPPool")
开发者ID:carriercomm,项目名称:MyProject,代码行数:53,代码来源:attribute_mapping_test.py

示例10: __init__

    def __init__(self, vsm=None):
        """ Constructor to create IPSet object

        @param vsm object on which IPSet has to be configured
        """
        super(ReplicatorRole, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'replicator_role_schema.ReplicatorRoleSchema'
        self.set_connection(vsm.get_connection())
        self.set_create_endpoint("universalsync/configuration/role")
        self.id = None
        self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:12,代码来源:replicator_role.py

示例11: __init__

 def __init__(self, serviceinstance=None):
     """ Constructor to create ServiceInstanceRuntimeInfo object
     @param vsm object on which ServiceInstanceRuntimeInfo has to be configured
     """
     super(ServiceInstanceRuntimeInfo, self).__init__()
     self.log = logger.setup_logging(self.__class__.__name__)
     self.schema_class = 'service_instance_runtime_info_schema.ServiceInstanceRuntimeInfoSchema'
     self.set_connection(serviceinstance.get_connection())
     #create endpoint e.g. si/serviceinstance/serviceinstance-1/runtimeinfo
     self.set_create_endpoint("si/serviceinstance/" + str(serviceinstance.id) + "/runtimeinfo")
     self.id = None
     self.update_as_post = True
开发者ID:carriercomm,项目名称:MyProject,代码行数:12,代码来源:service_instance_runtime_info.py

示例12: __init__

 def __init__(self, serviceprofile=None):
     """ Constructor to create ServiceProfileBinding object
     @param vsm object on which ServiceProfileBinding has to be configured
     """
     super(ServiceProfileBinding, self).__init__()
     self.log = logger.setup_logging(self.__class__.__name__)
     self.schema_class = 'service_profile_binding_schema.ServiceProfileBindingSchema'
     self.set_connection(serviceprofile.get_connection())
     #create endpoint e.g. si/serviceprofile/serviceprofile-1/binding
     self.set_create_endpoint("/si/serviceprofile/" + str(serviceprofile.id) + "/binding")
     self.set_read_endpoint('si/serviceprofile/' + str(serviceprofile.id))
     self.id = None
     self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:13,代码来源:service_profile_binding.py

示例13: __init__

    def __init__(self, vsm=None):
        """ Constructor to create VSMUniversalEntityReplicationStatus object

        @param vsm object on which Replication status has to be checked
        """
        super(VSMUniversalEntityReplicationStatus, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'vsm_entity_sync_status_schema.VSMEntitySyncStatusSchema'
        self.set_connection(vsm.get_connection())
        conn = self.get_connection()
        self.set_create_endpoint("universalsync/entitystatus")
        self.id = None
        self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:13,代码来源:vsm_universal_entity_replication_status.py

示例14: __init__

    def __init__(self, vsm=None):
        """ Constructor to create IPSet object

        @param vsm object on which IPSet has to be configured
        """
        super(VSMRegister, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'vsm_nsx_manager_info_schema.NSXManagerInfoSchema'
        self.set_connection(vsm.get_connection())
        self.set_create_endpoint(
            "universalsync/configuration/nsxmanagers")
        self.id = None
        self.update_as_post = False
        self.location_header = None
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:vsm_register.py

示例15: __init__

    def __init__(self, neutron=None):
        """ Constructor to create OperatingMode object

        @param neutron object on which OperatingMode object has to be configured
        """
        super(OperatingMode, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'neutron_operating_mode_schema.OperatingModeSchema'

        if neutron is not None:
            self.set_connection(neutron.get_connection())

        self.set_create_endpoint("/cluster/operatingmode")
        self.id = None
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:neutron_operating_mode.py


注:本文中的vmware.common.logger.setup_logging函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。