コード例 #1
0
ファイル: base.py プロジェクト: madar010/mad
    def get_raw_data(self, job_binary, **kwargs):
        """Get the raw binary

        Used only by the API, if the type doesn't support this operation it
        should raise NotImplementedException

        :param job_binary: The object handle to a job binary

        :returns: Raw binary

        """
        raise ex.NotImplementedException()
コード例 #2
0
ファイル: ssh_remote.py プロジェクト: lwlzpn84/sahara
def _update_repository():
    distrib = _get_os_distrib()
    if distrib == 'ubuntu':
        cmd = 'apt-get update'
    elif distrib == 'fedora':
        fversion = _get_os_version()
        if fversion >= 22:
            cmd = 'dnf clean all'
        else:
            cmd = 'yum clean all'
    elif distrib in ('redhat', 'centos'):
        cmd = 'yum clean all'
    else:
        raise ex.NotImplementedException(
            _('Repository Update'),
            _('%(fmt)s is not implemented for OS %(distrib)s') % {
                'fmt': '%s', 'distrib': distrib})
    _execute_command(cmd, run_as_root=True)
コード例 #3
0
ファイル: ssh_remote.py プロジェクト: lwlzpn84/sahara
def _install_packages(packages):
    distrib = _get_os_distrib()
    if distrib == 'ubuntu':
        cmd = 'RUNLEVEL=1 apt-get install -y %(pkgs)s'
    elif distrib == 'fedora':
        fversion = _get_os_version()
        if fversion >= 22:
            cmd = 'dnf install -y %(pkgs)s'
        else:
            cmd = 'yum install -y %(pkgs)s'
    elif distrib in ('redhat', 'centos'):
        cmd = 'yum install -y %(pkgs)s'
    else:
        raise ex.NotImplementedException(
            _('Package Installation'),
            _('%(fmt)s is not implemented for OS %(distrib)s') % {
                'fmt': '%s', 'distrib': distrib})
    cmd = cmd % {'pkgs': ' '.join(packages)}
    _execute_command(cmd, run_as_root=True)
コード例 #4
0
ファイル: engine.py プロジェクト: lwlzpn84/sahara
 def run_scheduled_job(self, job_execution):
     raise e.NotImplementedException(_("Currently Spark engine does not"
                                       " support scheduled EDP jobs"))
コード例 #5
0
ファイル: implementation.py プロジェクト: madar010/mad
 def get_raw_data(self, job_binary, **kwargs):
     raise ex.NotImplementedException('Manila does not implement this '
                                      'method')
コード例 #6
0
 def get(self, hosts, item):
     raise exceptions.NotImplementedException("BaseParams.get")