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


Python Unskin.update方法代码示例

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


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

示例1: set_options

# 需要导入模块: from suds.properties import Unskin [as 别名]
# 或者: from suds.properties.Unskin import update [as 别名]
 def set_options(self, **kwargs):
     """
     Set options.
     @param kwargs: keyword arguments.
     @see: L{Options}
     """
     p = Unskin(self.options)
     p.update(kwargs)
开发者ID:jonathan-hepp,项目名称:suds,代码行数:10,代码来源:client.py

示例2: clone

# 需要导入模块: from suds.properties import Unskin [as 别名]
# 或者: from suds.properties.Unskin import update [as 别名]
 def clone(self):
     """
     Get a shallow clone of this object.
     The clone only shares the WSDL.  All other attributes are
     unique to the cloned object including options.
     @return: A shallow clone.
     @rtype: L{Client}
     """
     class Uninitialized(Client):
         def __init__(self):
             pass
     clone = Uninitialized()
     clone.options = Options()
     cp = Unskin(clone.options)
     mp = Unskin(self.options)
     cp.update(deepcopy(mp))
     clone.wsdl = self.wsdl
     clone.factory = self.factory
     clone.service = ServiceSelector(clone, self.wsdl.services)
     clone.sd = self.sd
     clone.messages = dict(tx=None, rx=None)
     return clone
开发者ID:jonathan-hepp,项目名称:suds,代码行数:24,代码来源:client.py

示例3: __deepcopy__

# 需要导入模块: from suds.properties import Unskin [as 别名]
# 或者: from suds.properties.Unskin import update [as 别名]
 def __deepcopy__(self, memo={}):
     clone = self.__class__()
     p = Unskin(self.options)
     cp = Unskin(clone.options)
     cp.update(p)
     return clone
开发者ID:EASYMARKETING,项目名称:suds-jurko,代码行数:8,代码来源:http.py

示例4: __init__

# 需要导入模块: from suds.properties import Unskin [as 别名]
# 或者: from suds.properties.Unskin import update [as 别名]
 def __init__(self, server=None, username=None, password=None,
              wsdl_location="local", timeout=30, init_clone=False, clone=None):
     #self._init_logging()
     self._logged_in = False
     if server is None:
         server = _config_value("general", "server")
     if username is None:
         username = _config_value("general", "username")
     if password is None:
         password = _config_value("general", "password")
     if server is None:
         raise ConfigError("server must be set in config file or Client()")
     if username is None:
         raise ConfigError("username must be set in config file or Client()")
     if password is None:
         raise ConfigError("password must be set in config file or Client()")
     self.server = server
     self.username = username
     self.password = password
     url = "https://%s/sdk" % self.server
     if wsdl_location == "local":
         current_path = os.path.abspath(os.path.dirname(__file__))            
         current_path = current_path.replace('\\', '/')
         if not current_path.startswith('/') :
             current_path = '/' + current_path
         if current_path.endswith('/') :
             current_path = current_path[:-1]
         wsdl_uri = ("file://%s/wsdl/vimService.wsdl" % current_path)
     elif wsdl_location == "remote":
         wsdl_uri = url + "/vimService.wsdl"
     else:
         print("FATAL: wsdl_location must be \"local\" or \"remote\"")
         sys.exit(1)
     # Init the base class
     if clone:
         self.sd=clone.sd
         self.options = Options()
         cp = Unskin(self.options)
         mp = Unskin(clone.options)
         cp.update(deepcopy(mp))
         self.wsdl = clone.wsdl
         self.factory = clone.factory
         self.service = ServiceSelector(self, clone.wsdl.services)
         self.messages = dict(tx=None, rx=None)
     else:
         try:
             suds.client.Client.__init__(self, wsdl_uri)
         except URLError:
             logger.critical("Failed to connect to %s" % self.server)
             raise
         except IOError:
             logger.critical("Failed to load the local WSDL from %s" % wsdl_uri)
             raise
         except TransportError:
             logger.critical("Failed to load the remote WSDL from %s" % wsdl_uri)
             raise
     if init_clone:
         return
     self.options.transport.options.timeout = timeout
     self.set_options(location=url)
     mo_ref = soap.ManagedObjectReference("ServiceInstance",
                                          "ServiceInstance")
     self.si = ServiceInstance(mo_ref, self) 
     try:
         self.sc = self.si.RetrieveServiceContent()
     except URLError, e:
         #print("Failed to connect to %s" % self.server)
         #print("urllib2 said: %s" % e.reason) 
         #sys.exit(1)
         raise
开发者ID:rzenker,项目名称:psphere-daemon,代码行数:72,代码来源:client.py


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