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


Python SOAPProxy.insert方法代码示例

本文整理汇总了Python中SOAPpy.SOAPProxy.insert方法的典型用法代码示例。如果您正苦于以下问题:Python SOAPProxy.insert方法的具体用法?Python SOAPProxy.insert怎么用?Python SOAPProxy.insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SOAPpy.SOAPProxy的用法示例。


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

示例1: createSNOWIncident

# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import insert [as 别名]
    def createSNOWIncident(self, params_dict):
        import datetime
        from SOAPpy import SOAPProxy

        # instance to send to
        instance = 'Company1prod'

        # username/password
        username = 'svcArcSight'
        password = '[email protected]'


        # proxy - NOTE: ALWAYS use https://INSTANCE.service-now.com, not https://www.service-now.com/INSTANCE for web services URL from now on!
        proxy = 'https://%s:%[email protected]%s.service-now.com/incident.do?SOAP' % (username, password, instance)
        namespace = 'http://www.service-now.com/'
        server = SOAPProxy(proxy, namespace)

        # uncomment these for LOTS of debugging output
        # server.config.dumpHeadersIn = 1
        # server.config.dumpHeadersOut = 1
        # server.config.dumpSOAPOut = 1
        # server.config.dumpSOAPIn = 1

        response = server.insert(impact=int(params_dict['impact']), urgency=int(params_dict['urgency']), priority=int(params_dict['priority']), category=params_dict['category'], u_current_location=params_dict['location'], caller_id=params_dict['user'], assignment_group=params_dict['assignment_group'], subcategory=params_dict['subcategory'], short_description=params_dict['short_description'], description=params_dict['description'], u_business_unit=params_dict['business_unit'])

        return response
开发者ID:logicbell,项目名称:ArcSightServiceNowIntegration,代码行数:28,代码来源:serviceNowInterface.py

示例2: createincident

# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import insert [as 别名]
def createincident(params_dict):

        # instance to send to
        instance='xxxxxx'

        # username/password
        username='xxxxx'
        password='xxxxxx'


        # proxy - NOTE: ALWAYS use https://INSTANCE.service-now.com, not https://www.service-now.com/INSTANCE for web services URL from now on!
#        proxy = 'https://%s:%[email protected]%s.service-now.com/u_nimsoft.do?WSDL' % (username, password, instance)
        proxy = 'https://%s:%[email protected]%s.service-now.com/incident.do?SOAP' % (username, password, instance)
        namespace = 'http://www.service-now.com/'
        server = SOAPProxy(proxy, namespace)

        # uncomment these for LOTS of debugging output
        #server.config.dumpHeadersIn = 1
        #server.config.dumpHeadersOut = 1
        #server.config.dumpSOAPOut = 1
        #server.config.dumpSOAPIn = 1

        response = server.insert(
                impact=int(params_dict['impact']),
                urgency=int(params_dict['urgency']),
#               caller_id=params_dict['caller_id'],
                category=str(params_dict['category']),
                assignment_group=params_dict['assignment_group'],
                short_description=params_dict['short_description'],
                comments=params_dict['comments'])

        return response
开发者ID:EashwarRaghunathan,项目名称:Service-Now,代码行数:34,代码来源:createinsidentsoap.py

示例3: createincident

# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import insert [as 别名]
def createincident(incident):
        proxy = 'https://%s:%[email protected]%s.service-now.com/%s?SOAP' % (username, base64.b64decode(password), instance, interface)
        namespace = 'http://www.service-now.com/'
        server = SOAPProxy(proxy, namespace)
        server.config.dumpHeadersIn = debug
        server.config.dumpHeadersOut = debug
        server.config.dumpSOAPOut = debug
        server.config.dumpSOAPIn = debug
        response = server.insert(
            impact              = incident['impact'],
            urgency             = incident['urgency'],
            priority            = incident['priority'],
            category            = incident['category'],
            subcategory         = incident['subcategory'],
            caller              = incident['caller'],
            assignment_group    = incident['assignment_group'],
            configuration_item  = incident['configuration_item'],
            short_description   = incident['short_description'],
            additional_comments = incident['additional_comments']
        )
        return response
开发者ID:Krylon360,项目名称:zabbix-script-servicenow,代码行数:23,代码来源:zabbix-create-service-now-incident.py

示例4: SOAPProxy

# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import insert [as 别名]
from SOAPpy import SOAPProxy

username, password, instance, gliderecord = '', '', '', ''
proxy = "https://%s:%[email protected]%s.service-now.com/%s.do?SOAP" % (username, password, instance, gliderecord, )
namespace = 'http://www.glidesoft.com/'

server = SOAPProxy(proxy,namespace)
#limit record set? 
start, end = 0, 2

print server.insert(
    u_username='',
    u_text="this is my kiosk contact data", 
    u_osu_id='32345235235',
    u_short_description = 'my custom short description' 
)


开发者ID:gaddie-3,项目名称:snsoapclient,代码行数:18,代码来源:insert.py


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