• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python logger.setup_logging函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: __init__

    def __init__(self, security_group=None, ip_address=None):
        """ Constructor to get translated IP addresses from
        security group

        @param security group object on which translation has to be checked
        """
        super(SecurityGroupLookupIPAddress, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'vsm_security_groups_schema.SecurityGroupsSchema'
        self.set_connection(security_group.get_connection())
        if ip_address is None:
            raise ValueError("IP Address to be used for lookup is None")
        self.set_create_endpoint(
            "/services/securitygroup/lookup/ipaddress/%s" % ip_address)
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:vsm_security_group_lookup_ipaddress.py


示例17: __init__

    def __init__(self, logical_switch=None):
        """ Constructor to create LogicalSwitchPort object

        @param LogicalSwitch object on which LogicalSwitchPort object has to be configured
        """
        super(LogicalSwitchPort, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'logical_switch_port_schema.LogicalSwitchPortSchema'

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

        self.set_create_endpoint("/lswitches/" + logical_switch.id +"/ports")
        self.id = None
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:logical_switch_port.py


示例18: __init__

    def __init__(self, logical_switch_port=None):
        """ Constructor to create VifAttachment object

        @param VifAttachment object on which VifAttachment object has to be configured
        """
        super(VifAttachment, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'vif_attachment_schema.VifAttachmentSchema'

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

        self.set_create_endpoint(logical_switch_port.create_endpoint + "/" + logical_switch_port.id +"/attachment")
        self.id = None
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:vif_attachment.py


示例19: __init__

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

        @param vsm object on which IPSet has to be configured
        """
        super(ReplicatorStatus, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'nsxapi_appliance_management_schema.NSXAPIApplianceManagementSchema'
        self.set_connection(vsm.get_connection())
        conn = self.get_connection()
        conn.set_api_header("api/1.0")
        self.set_create_endpoint("appliance-management/components/component/NSXREPLICATOR/status")
        self.id = None
        self.update_as_post = False
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:replicator_status.py


示例20: __init__

    def __init__(self, applicationgroup=None):
        """ Constructor to create ApplicationGroupMember object

        @param applicationgroup object in which member has to be added
        """
        super(ApplicationGroupMember, self).__init__()
        self.log = logger.setup_logging(self.__class__.__name__)
        self.schema_class = 'application_group_member_schema.ApplicationGroupMemberSchema'

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

        self.set_create_endpoint("/services/applicationgroup/%s" % applicationgroup.id)
        self.set_delete_endpoint("/services/applicationgroup/%s/members" % applicationgroup.id)
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:application_group_member.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python _i18n._函数代码示例发布时间:2022-05-26
下一篇:
Python vmtkrenderer.vmtkRenderer函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap