示例#1
0
 def __init__(self, install_path, host_class_was_created):
     if not isinstance(install_path, InstallPath):
         install_path = InstallPath(install_path)
     self.install_path = install_path  # the path of which the installation's class is target
     self.host_class_was_created = host_class_was_created
     self.commands = []  # list of command definitions
     self.intermediates = {}  # property name --> intermediate class
示例#2
0
 def __init__(self,
              json_schema,
              full_name,
              parameters=None,
              return_info=None,
              is_property=False,
              doc=None,
              maturity=None,
              api_version=None):
     self.json_schema = json_schema
     self.full_name = full_name
     parts = self.full_name.split('/')
     self.entity_type = parts[0]
     if not self.entity_type:
         raise ValueError(
             "Invalid empty entity_type, expected non-empty string")
     self.intermediates = tuple(parts[1:-1])
     self.name = parts[-1]
     self.install_path = InstallPath(full_name[:-(len(self.name) + 1)])
     self.parameters = parameters if parameters else []
     self.return_info = return_info
     self.is_property = is_property
     self.maturity = maturity
     self.version = api_version
     self._doc = None  # handle type conversion in the setter, next line
     self.doc = doc
示例#3
0
def get_entity_class_from_store(entity_type):
    return get_class_from_store(InstallPath(entity_type))