示例#1
0
 def install(self, units, options):
     """
     Install the specified content units using the specified options.
     Delegated to content handlers.
     :param units: A list of content units to be installed.
     :type units: list of:
         { type_id:<str>, unit_key:<dict> }
     :param options: Install options; based on unit type.
     :type options: dict
     :return: A dispatch report.
     :rtype: DispatchReport
     """
     conduit = Conduit()
     dispatcher = Dispatcher()
     report = dispatcher.install(conduit, units, options)
     return report.dict()
示例#2
0
 def install(self, units, options):
     """
     Install the specified content units using the specified options.
     Delegated to content handlers.
     :param units: A list of content units to be installed.
     :type units: list of:
         { type_id:<str>, unit_key:<dict> }
     :param options: Install options; based on unit type.
     :type options: dict
     :return: A dispatch report.
     :rtype: DispatchReport
     """
     conduit = Conduit()
     dispatcher = Dispatcher()
     report = dispatcher.install(conduit, units, options)
     return report.dict()