コード例 #1
0
ファイル: events.py プロジェクト: axemblr/cm_api
 def _setattr(self, k, v):
     if k == "timeOccurred" and v is not None:
         self.timeOccurred = api_time_to_datetime(v)
     elif k == "timeReceived" and v is not None:
         self.timeReceived = api_time_to_datetime(v)
     else:
         BaseApiObject._setattr(self, k, v)
コード例 #2
0
ファイル: services.py プロジェクト: axemblr/cm_api
 def __init__(self, name=None, type=None,
              config=None, roles=None):
   # The BaseApiObject expects a resource_root, which we don't care about
   resource_root = None
   # Unfortunately, the json key is called "type". So our input arg
   # needs to be called "type" as well, despite it being a python keyword.
   BaseApiObject.ctor_helper(**locals())
コード例 #3
0
 def _setattr(self, k, v):
     if k == 'timeOccurred' and v is not None:
         self.timeOccurred = api_time_to_datetime(v)
     elif k == 'timeReceived' and v is not None:
         self.timeReceived = api_time_to_datetime(v)
     else:
         BaseApiObject._setattr(self, k, v)
コード例 #4
0
ファイル: hosts.py プロジェクト: axemblr/cm_api
 def __init__(self, resource_root, hostId, hostname,
     ipAddress=None, rackId=None):
   # Note about "ipAddress = None":
   #
   # This generally happens when you bring up SCM and it gets an
   # "optimized" heartbeat from an agent, and you query the host info
   # before it's fully constructed. The JSON returned wouldn't have
   # the ipAddress field, and a TypeError would be raised.
   BaseApiObject.ctor_helper(**locals())
コード例 #5
0
 def __init__(self,
              resource_root,
              hostId,
              hostname,
              ipAddress=None,
              rackId=None):
     # Note about "ipAddress = None":
     #
     # This generally happens when you bring up SCM and it gets an
     # "optimized" heartbeat from an agent, and you query the host info
     # before it's fully constructed. The JSON returned wouldn't have
     # the ipAddress field, and a TypeError would be raised.
     BaseApiObject.ctor_helper(**locals())
コード例 #6
0
ファイル: clusters.py プロジェクト: rickysaltzer/cm_api
 def __init__(self, resource_root, name, version):
   BaseApiObject.ctor_helper(**locals())
コード例 #7
0
ファイル: events.py プロジェクト: axemblr/cm_api
 def __init__(self, resource_root):
     BaseApiObject.ctor_helper(**locals())
コード例 #8
0
ファイル: services.py プロジェクト: axemblr/cm_api
 def __init__(self, resource_root, name, type):
   # Unfortunately, the json key is called "type". So our input arg
   # needs to be called "type" as well, despite it being a python keyword.
   BaseApiObject.ctor_helper(**locals())
コード例 #9
0
 def __init__(self, resource_root, name, password=None, roles=None):
     BaseApiObject.ctor_helper(**locals())
コード例 #10
0
ファイル: users.py プロジェクト: 007shenglong/MyHadoop
 def __init__(self, resource_root, name=None, password=None, roles=None):
   BaseApiObject.init(self, resource_root, locals())
コード例 #11
0
ファイル: users.py プロジェクト: axemblr/cm_api
 def __init__(self, resource_root, name, password=None, roles=None):
   BaseApiObject.ctor_helper(**locals())
コード例 #12
0
ファイル: clusters.py プロジェクト: corersky/cm_api
 def __init__(self, resource_root, name, version):
   BaseApiObject.ctor_helper(**locals())
コード例 #13
0
ファイル: roles.py プロジェクト: corersky/cm_api
 def __init__(self, resource_root, name, type, hostRef):
   # Unfortunately, the json key is called "type". So our input arg
   # needs to be called "type" as well, despite it being a python keyword.
   BaseApiObject.ctor_helper(**locals())
コード例 #14
0
 def __init__(self, resource_root):
     BaseApiObject.ctor_helper(**locals())
コード例 #15
0
ファイル: services.py プロジェクト: corersky/cm_api
 def __init__(self, name=None, type=None, config=None, roles=None):
     # The BaseApiObject expects a resource_root, which we don't care about
     resource_root = None
     # Unfortunately, the json key is called "type". So our input arg
     # needs to be called "type" as well, despite it being a python keyword.
     BaseApiObject.ctor_helper(**locals())
コード例 #16
0
 def __init__(self, resource_root, name=None, password=None, roles=None):
     BaseApiObject.init(self, resource_root, locals())