コード例 #1
0
ファイル: cmd.py プロジェクト: rnovacek/openlmi-scripts
 def execute(self, ns, package_array=None, _force=False, _repoid=None):
     return for_each_package_specs(
         ns,
         package_array,
         "update",
         lambda identity: software.install_package(ns, identity, force=_force, update=True),
         repoid=_repoid,
     )
コード例 #2
0
ファイル: cmd.py プロジェクト: vcrhonek/openlmi-scripts
 def execute(self, ns, package_array=None, _force=False, _repoid=None):
     return for_each_package_specs(
         ns,
         package_array,
         'update',
         lambda identity: software.install_package(
             ns, identity, force=_force, update=True),
         repoid=_repoid)
コード例 #3
0
ファイル: cmd.py プロジェクト: rnovacek/openlmi-scripts
    def execute(self, ns, package_array=None, _uri=None, _force=False, _repoid=None):
        if _uri is not None:
            try:
                software.install_from_uri(ns, _uri, force=_force)
                return ([_uri], [])
            except errors.LmiFailed as err:
                LOG().warn('Failed to install "%s": %s', _uri, err)
                return ([], [err])

        else:
            return for_each_package_specs(
                ns,
                package_array,
                "install",
                lambda identity: software.install_package(ns, identity, force=_force),
                repoid=_repoid,
                just_on_installed=False,
            )
コード例 #4
0
    def execute(self, ns,
            package_array=None,
            _uri=None,
            _force=False,
            _repoid=None):
        if _uri is not None:
            try:
                software.install_from_uri(ns, _uri, force=_force)
                return [_uri]
            except errors.LmiFailed as err:
                LOG().warn('failed to install "%s": %s', _uri, err)

        else:
            return for_each_package_specs(ns, package_array, 'install',
                    lambda identity: software.install_package(
                        ns, identity, force=_force),
                    repoid=_repoid,
                    just_on_installed=False)

        return []