def test_f(self):
     CreateDataType('a', 'b', 'c', 'd',
                    [(F_LINK | F_LINKABLE | F_OPTIONAL, 0)], self.out)
     self.assertEqual(
         self.out.getvalue(),
         '    create_data_type("a", "b", "c", "d", [[{:link => true, :linkable => true, :optional => true}]])\n'
     )
 def test_e_list(self):
     CreateDataType('a', 'b', 'c', 'd', [("f", "g", "h", 0)], self.out)
     self.assertEqual(self.out.getvalue(),
         '    create_data_type("a", "b", "c", "d", [["f", "g", "h"]])\n')
 def test_e_none(self):
     CreateDataType('a', 'b', 'c', 'd', None, self.out)
     self.assertEqual(self.out.getvalue(),
         '    create_data_type("a", "b", "c", "d", nil)\n')
Example #4
0
AddVersionParent("vmodl.query.version.version2", "vmodl.version.version1")
AddVersionParent("vmodl.query.version.version3",
                 "vmodl.query.version.version1")
AddVersionParent("vmodl.query.version.version3",
                 "vmodl.query.version.version2")
AddVersionParent("vmodl.query.version.version3",
                 "vmodl.query.version.version3")
AddVersionParent("vmodl.query.version.version3", "vmodl.version.version0")
AddVersionParent("vmodl.query.version.version3", "vmodl.version.version1")
AddVersionParent("vmodl.version.version0", "vmodl.version.version0")
AddVersionParent("vmodl.version.version1", "vmodl.version.version0")
AddVersionParent("vmodl.version.version1", "vmodl.version.version1")

CreateDataType(
    "vmodl.DynamicArray", "DynamicArray", "vmodl.DataObject",
    "vmodl.version.version0",
    [("dynamicType", "string", "vmodl.version.version0", F_OPTIONAL),
     ("val", "anyType[]", "vmodl.version.version0", 0)])
CreateDataType(
    "vmodl.DynamicData", "DynamicData", "vmodl.DataObject",
    "vmodl.version.version0",
    [("dynamicType", "string", "vmodl.version.version0", F_OPTIONAL),
     ("dynamicProperty", "vmodl.DynamicProperty[]", "vmodl.version.version0",
      F_OPTIONAL)])
CreateDataType("vmodl.DynamicProperty", "DynamicProperty", "vmodl.DataObject",
               "vmodl.version.version0",
               [("name", "vmodl.PropertyPath", "vmodl.version.version0", 0),
                ("val", "anyType", "vmodl.version.version0", 0)])
CreateDataType("vmodl.KeyAnyValue", "KeyAnyValue", "vmodl.DynamicData",
               "vmodl.version.version1",
               [("key", "string", "vmodl.version.version1", 0),
Example #5
0
AddVersionParent("vmodl.query.version.version2", "vmodl.version.version0")
AddVersionParent("vmodl.query.version.version2", "vmodl.version.version1")
AddVersionParent("vmodl.query.version.version2",
                 "vmodl.query.version.version2")
AddVersionParent("vmodl.query.version.version2",
                 "vmodl.query.version.version1")
AddVersionParent("vmodl.query.version.version1", "vmodl.version.version0")
AddVersionParent("vmodl.query.version.version1",
                 "vmodl.query.version.version1")

newestVersions.Add("vmodl.query.version.version4")
publicVersions.Add("vmodl.query.version.version4")
oldestVersions.Add("vmodl.query.version.version1")

CreateDataType("vmodl.query.InvalidCollectorVersion",
               "InvalidCollectorVersion", "vmodl.MethodFault",
               "vmodl.query.version.version1", None)
CreateDataType(
    "vmodl.query.InvalidProperty", "InvalidProperty", "vmodl.MethodFault",
    "vmodl.query.version.version1",
    [("name", "vmodl.PropertyPath", "vmodl.query.version.version1", 0)])
CreateManagedType(
    "vmodl.query.PropertyCollector", "PropertyCollector",
    "vmodl.ManagedObject", "vmodl.query.version.version1",
    [("filter", "vmodl.query.PropertyCollector.Filter[]",
      "vmodl.query.version.version1", F_OPTIONAL, "System.View")],
    [("createFilter", "CreateFilter", "vmodl.query.version.version1", (
        ("spec", "vmodl.query.PropertyCollector.FilterSpec",
         "vmodl.query.version.version1", 0, None),
        ("partialUpdates", "boolean", "vmodl.query.version.version1", 0, None),
    ), (0, "vmodl.query.PropertyCollector.Filter",
Example #6
0
AddVersionParent('vmodl.query.version.version3',
                 'vmodl.query.version.version1')
AddVersionParent('vmodl.query.version.version3',
                 'vmodl.query.version.version2')
AddVersionParent('vmodl.query.version.version3',
                 'vmodl.query.version.version3')
AddVersionParent('vmodl.query.version.version3', 'vmodl.version.version0')
AddVersionParent('vmodl.query.version.version3', 'vmodl.version.version1')
AddVersionParent('vmodl.version.version0', 'vmodl.version.version0')
AddVersionParent('vmodl.version.version1', 'vmodl.version.version0')
AddVersionParent('vmodl.version.version1', 'vmodl.version.version1')
CreateDataType(
    'sms.AboutInfo', 'SmsAboutInfo', 'vmodl.DynamicData',
    'sms.version.version2',
    [('name', 'string', 'sms.version.version2', 0),
     ('fullName', 'string', 'sms.version.version2', 0),
     ('vendor', 'string', 'sms.version.version2', 0),
     ('apiVersion', 'string', 'sms.version.version2', 0),
     ('instanceUuid', 'string', 'sms.version.version2', 0),
     ('vasaApiVersion', 'string', 'sms.version.version4', F_OPTIONAL)])
CreateDataType('sms.DbConnectionSpec', 'DbConnectionSpec', 'vmodl.DynamicData',
               'sms.version.version1',
               [('url', 'string', 'sms.version.version1', 0),
                ('username', 'string', 'sms.version.version1', 0),
                ('password', 'string', 'sms.version.version1', 0)])
CreateDataType('sms.EntityReference', 'EntityReference', 'vmodl.DynamicData',
               'sms.version.version1',
               [('id', 'string', 'sms.version.version1', 0),
                ('type', 'sms.EntityReference.EntityType',
                 'sms.version.version1', F_OPTIONAL)])
CreateEnumType('sms.EntityReference.EntityType', 'EntityReferenceEntityType',
Example #7
0
AddVersionParent("vmodl.version.version2", "vmodl.version.version2")
AddVersionParent("vmodl.version.version2", "vmodl.version.version1")
AddVersionParent("vmodl.version.version2", "vmodl.version.version0")
AddVersionParent("vmodl.version.version1", "vmodl.version.version1")
AddVersionParent("vmodl.version.version1", "vmodl.version.version0")
AddVersionParent("vmodl.version.version0", "vmodl.version.version0")

newestVersions.Add("eam.version.version6")
currentVersions.Add("eam.version.version6")
stableVersions.Add("eam.version.version6")
matureVersions.Add("eam.version.version6")
publicVersions.Add("eam.version.version6")
oldestVersions.Add("eam.version.version1")

CreateManagedType("eam.EamObject", "EamObject", "vmodl.ManagedObject", "eam.version.version1", None, [("resolve", "Resolve", "eam.version.version1", (("issueKey", "int[]", "eam.version.version1", 0, None),), (F_OPTIONAL, "int[]", "int[]"), None, None), ("resolveAll", "ResolveAll", "eam.version.version1", (), (0, "void", "void"), None, None), ("queryIssue", "QueryIssue", "eam.version.version1", (("issueKey", "int[]", "eam.version.version1", F_OPTIONAL, None),), (F_OPTIONAL, "eam.issue.Issue[]", "eam.issue.Issue[]"), None, None)])
CreateDataType("eam.EamObject.RuntimeInfo", "EamObjectRuntimeInfo", "vmodl.DynamicData", "eam.version.version1", [("status", "string", "eam.version.version1", 0), ("issue", "eam.issue.Issue[]", "eam.version.version1", F_OPTIONAL), ("goalState", "string", "eam.version.version1", 0), ("entity", "eam.EamObject", "eam.version.version1", 0)])
CreateEnumType("eam.EamObject.RuntimeInfo.Status", "EamObjectRuntimeInfoStatus", "eam.version.version1", ["green", "yellow", "red"])
CreateEnumType("eam.EamObject.RuntimeInfo.GoalState", "EamObjectRuntimeInfoGoalState", "eam.version.version1", ["enabled", "disabled", "uninstalled"])
CreateManagedType("eam.Task", "EamTask", "vmodl.ManagedObject", "eam.version.version1", None, None)
CreateDataType("eam.fault.EamFault", "EamFault", "vmodl.MethodFault", "eam.version.version1", None)
CreateDataType("eam.fault.EamRuntimeFault", "EamRuntimeFault", "vmodl.RuntimeFault", "eam.version.version1", None)
CreateDataType("eam.fault.InvalidAgencyScope", "InvalidAgencyScope", "eam.fault.EamFault", "eam.version.version1", [("unknownComputeResource", "vim.ComputeResource[]", "eam.version.version1", F_OPTIONAL)])
CreateDataType("eam.fault.InvalidLogin", "EamInvalidLogin", "eam.fault.EamRuntimeFault", "eam.version.version1", None)
CreateDataType("eam.fault.InvalidUrl", "InvalidUrl", "eam.fault.EamFault", "eam.version.version1", [("url", "string", "eam.version.version1", 0), ("malformedUrl", "boolean", "eam.version.version1", 0), ("unknownHost", "boolean", "eam.version.version1", 0), ("connectionRefused", "boolean", "eam.version.version1", 0), ("responseCode", "int", "eam.version.version1", F_OPTIONAL)])
CreateDataType("eam.fault.InvalidVibPackage", "EamInvalidVibPackage", "eam.fault.EamRuntimeFault", "eam.version.version1", None)
CreateDataType("eam.fault.NoConnectionToVCenter", "NoConnectionToVCenter", "eam.fault.EamRuntimeFault", "eam.version.version1", None)
CreateDataType("eam.fault.NotAuthorized", "NotAuthorized", "eam.fault.EamRuntimeFault", "eam.version.version1", None)
CreateDataType("eam.issue.Issue", "Issue", "vmodl.DynamicData", "eam.version.version1", [("key", "int", "eam.version.version1", 0), ("description", "string", "eam.version.version1", 0), ("time", "vmodl.DateTime", "eam.version.version1", 0)])
CreateDataType("eam.vib.VibInfo", "VibVibInfo", "vmodl.DynamicData", "eam.version.version6", [("id", "string", "eam.version.version6", 0), ("name", "string", "eam.version.version6", 0), ("version", "string", "eam.version.version6", 0), ("vendor", "string", "eam.version.version6", 0), ("summary", "string", "eam.version.version6", 0), ("releaseDate", "vmodl.DateTime", "eam.version.version6", 0)])
CreateManagedType("eam.vib.VibServices", "VibVibServices", "vmodl.ManagedObject", "eam.version.version6", None, [("packageContent", "PackageContent", "eam.version.version6", (("vibPackageUrl", "string", "eam.version.version6", 0, None),), (0, "eam.vib.VibInfo[]", "eam.vib.VibInfo[]"), None, None)])
CreateManagedType("eam.Agent", "Agent", "eam.EamObject", "eam.version.version1", [("runtime", "eam.Agent.RuntimeInfo", "eam.version.version1", 0, None), ("config", "eam.Agent.ConfigInfo", "eam.version.version1", 0, None)], [("queryRuntime", "AgentQueryRuntime", "eam.version.version1", (), (0, "eam.Agent.RuntimeInfo", "eam.Agent.RuntimeInfo"), None, None), ("markAsAvailable", "MarkAsAvailable", "eam.version.version1", (), (0, "void", "void"), None, None), ("queryConfig", "AgentQueryConfig", "eam.version.version1", (), (0, "eam.Agent.ConfigInfo", "eam.Agent.ConfigInfo"), None, None)])
Example #8
0
AddVersion("vmodl.version.version0", "", "", 0, "vim25")
AddVersion("vmodl.version.version1", "", "", 0, "vim25")
AddVersion("vmodl.version.version2", "", "", 0, "vim25")
AddVersionParent("vmodl.version.version0", "vmodl.version.version0")
AddVersionParent("vmodl.version.version1", "vmodl.version.version0")
AddVersionParent("vmodl.version.version1", "vmodl.version.version1")
AddVersionParent("vmodl.version.version2", "vmodl.version.version0")
AddVersionParent("vmodl.version.version2", "vmodl.version.version1")
AddVersionParent("vmodl.version.version2", "vmodl.version.version2")

newestVersions.Add("vmodl.version.version2")
publicVersions.Add("vmodl.version.version2")
oldestVersions.Add("vmodl.version.version0")

CreateDataType("vmodl.DynamicArray", "DynamicArray", "vmodl.DataObject", "vmodl.version.version0", [("dynamicType", "string", "vmodl.version.version0", F_OPTIONAL), ("val", "anyType[]", "vmodl.version.version0", 0)])
CreateDataType("vmodl.DynamicData", "DynamicData", "vmodl.DataObject", "vmodl.version.version0", [("dynamicType", "string", "vmodl.version.version0", F_OPTIONAL), ("dynamicProperty", "vmodl.DynamicProperty[]", "vmodl.version.version0", F_OPTIONAL)])
CreateDataType("vmodl.DynamicProperty", "DynamicProperty", "vmodl.DataObject", "vmodl.version.version0", [("name", "vmodl.PropertyPath", "vmodl.version.version0", 0), ("val", "anyType", "vmodl.version.version0", 0)])
CreateDataType("vmodl.KeyAnyValue", "KeyAnyValue", "vmodl.DynamicData", "vmodl.version.version1", [("key", "string", "vmodl.version.version1", 0), ("value", "anyType", "vmodl.version.version1", 0)])
CreateDataType("vmodl.LocalizableMessage", "LocalizableMessage", "vmodl.DynamicData", "vmodl.version.version1", [("key", "string", "vmodl.version.version1", 0), ("arg", "vmodl.KeyAnyValue[]", "vmodl.version.version1", F_OPTIONAL), ("message", "string", "vmodl.version.version1", F_OPTIONAL)])
CreateDataType("vmodl.fault.HostCommunication", "HostCommunication", "vmodl.RuntimeFault", "vmodl.version.version0", None)
CreateDataType("vmodl.fault.HostNotConnected", "HostNotConnected", "vmodl.fault.HostCommunication", "vmodl.version.version0", None)
CreateDataType("vmodl.fault.HostNotReachable", "HostNotReachable", "vmodl.fault.HostCommunication", "vmodl.version.version0", None)
CreateDataType("vmodl.fault.InvalidArgument", "InvalidArgument", "vmodl.RuntimeFault", "vmodl.version.version0", [("invalidProperty", "vmodl.PropertyPath", "vmodl.version.version0", F_OPTIONAL)])
CreateDataType("vmodl.fault.InvalidRequest", "InvalidRequest", "vmodl.RuntimeFault", "vmodl.version.version0", None)
CreateDataType("vmodl.fault.InvalidType", "InvalidType", "vmodl.fault.InvalidRequest", "vmodl.version.version0", [("argument", "vmodl.PropertyPath", "vmodl.version.version0", F_OPTIONAL)])
CreateDataType("vmodl.fault.ManagedObjectNotFound", "ManagedObjectNotFound", "vmodl.RuntimeFault", "vmodl.version.version0", [("obj", "vmodl.ManagedObject", "vmodl.version.version0", 0)])
CreateDataType("vmodl.fault.MethodNotFound", "MethodNotFound", "vmodl.fault.InvalidRequest", "vmodl.version.version0", [("receiver", "vmodl.ManagedObject", "vmodl.version.version0", 0), ("method", "string", "vmodl.version.version0", 0)])
CreateDataType("vmodl.fault.NotEnoughLicenses", "NotEnoughLicenses", "vmodl.RuntimeFault", "vmodl.version.version0", None)
CreateDataType("vmodl.fault.NotImplemented", "NotImplemented", "vmodl.RuntimeFault", "vmodl.version.version0", None)
CreateDataType("vmodl.fault.NotSupported", "NotSupported", "vmodl.RuntimeFault", "vmodl.version.version0", None)
    "vmodl.ManagedObject", "vmodl.reflect.version.version1", None,
    [("queryTypeInfo", "DynamicTypeMgrQueryTypeInfo",
      "vmodl.reflect.version.version1",
      (("filterSpec", "vmodl.reflect.DynamicTypeManager.FilterSpec",
        "vmodl.reflect.version.version1", F_OPTIONAL, None), ),
      (0, "vmodl.reflect.DynamicTypeManager.AllTypeInfo",
       "vmodl.reflect.DynamicTypeManager.AllTypeInfo"), "System.Read", None),
     ("queryMoInstances", "DynamicTypeMgrQueryMoInstances",
      "vmodl.reflect.version.version1",
      (("filterSpec", "vmodl.reflect.DynamicTypeManager.FilterSpec",
        "vmodl.reflect.version.version1", F_OPTIONAL, None), ),
      (F_OPTIONAL, "vmodl.reflect.DynamicTypeManager.MoInstance[]",
       "vmodl.reflect.DynamicTypeManager.MoInstance[]"), "System.Read", None)])
CreateDataType(
    "vmodl.reflect.DynamicTypeManager.Annotation", "DynamicTypeMgrAnnotation",
    "vmodl.DynamicData", "vmodl.reflect.version.version1",
    [("name", "string", "vmodl.reflect.version.version1", 0),
     ("parameter", "string[]", "vmodl.reflect.version.version1", F_OPTIONAL)])
CreateDataType(
    "vmodl.reflect.DynamicTypeManager.PropertyTypeInfo",
    "DynamicTypeMgrPropertyTypeInfo", "vmodl.DynamicData",
    "vmodl.reflect.version.version1",
    [("name", "string", "vmodl.reflect.version.version1", 0),
     ("version", "string", "vmodl.reflect.version.version1", 0),
     ("type", "string", "vmodl.reflect.version.version1", 0),
     ("privId", "string", "vmodl.reflect.version.version1", F_OPTIONAL),
     ("msgIdFormat", "string", "vmodl.reflect.version.version1", F_OPTIONAL),
     ("annotation", "vmodl.reflect.DynamicTypeManager.Annotation[]",
      "vmodl.reflect.version.version1", F_OPTIONAL)])
CreateEnumType(
    "vmodl.reflect.DynamicTypeManager.PropertyTypeInfo.AnnotationType",
Example #10
0
AddVersionParent("vmodl.version.version2", "vmodl.version.version1")
AddVersionParent("vmodl.version.version2", "vmodl.version.version0")
AddVersionParent("vmodl.version.version1", "vmodl.version.version1")
AddVersionParent("vmodl.version.version1", "vmodl.version.version0")
AddVersionParent("vmodl.version.version0", "vmodl.version.version0")

newestVersions.Add("pbm.version.version2")
currentVersions.Add("pbm.version.version2")
stableVersions.Add("pbm.version.version2")
matureVersions.Add("pbm.version.version2")
publicVersions.Add("pbm.version.version2")
oldestVersions.Add("pbm.version.version1")

CreateDataType("pbm.AboutInfo", "PbmAboutInfo", "vmodl.DynamicData",
               "pbm.version.version1",
               [("name", "string", "pbm.version.version1", 0),
                ("version", "string", "pbm.version.version1", 0),
                ("instanceUuid", "string", "pbm.version.version1", 0)])
CreateDataType(
    "pbm.ExtendedElementDescription", "PbmExtendedElementDescription",
    "vmodl.DynamicData", "pbm.version.version1",
    [("label", "string", "pbm.version.version1", 0),
     ("summary", "string", "pbm.version.version1", 0),
     ("key", "string", "pbm.version.version1", 0),
     ("messageCatalogKeyPrefix", "string", "pbm.version.version1", 0),
     ("messageArg", "vmodl.KeyAnyValue[]", "pbm.version.version1", F_OPTIONAL)
     ])
CreateDataType("pbm.ServerObjectRef", "PbmServerObjectRef",
               "vmodl.DynamicData", "pbm.version.version1",
               [("objectType", "string", "pbm.version.version1", 0),
                ("key", "string", "pbm.version.version1", 0),