예제 #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
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
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
 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")