Ejemplo n.º 1
0
  def setPlatform( self, platform ):
    """Developer function: sets the target platform, e.g. Linux_x86_64_glibc-2.5.
       This platform is in the form of what it is returned by the dirac-platform script
       (or dirac-architecture if your extension provides it)
    """
    kwargs = {'platform':platform}

    if not type( platform ) == type( " " ):
      return self._reportError( "Expected string for platform", **kwargs )

    if not platform.lower() == 'any':
      availablePlatforms = Resources.getDIRACPlatforms()
      if not availablePlatforms['OK']:
        return self._reportError( "Can't check for platform", **kwargs )
      if platform in availablePlatforms['Value']:
        self._addParameter( self.workflow, 'Platform', 'JDL', platform, 'Platform ( Operating System )' )
      else:
        return self._reportError( "Invalid platform", **kwargs )

    return S_OK()
Ejemplo n.º 2
0
Archivo: Job.py Proyecto: ahaupt/DIRAC
  def setPlatform( self, platform ):
    """Developer function: sets the target platform, e.g. Linux_x86_64_glibc-2.5.
       This platform is in the form of what it is returned by the dirac-platform script
       (or dirac-architecture if your extension provides it)
    """
    kwargs = {'platform':platform}

    if not isinstance( platform, basestring ):
      return self._reportError( "Expected string for platform", **kwargs )

    if not platform.lower() == 'any':
      availablePlatforms = Resources.getDIRACPlatforms()
      if not availablePlatforms['OK']:
        return self._reportError( "Can't check for platform", **kwargs )
      if platform in availablePlatforms['Value']:
        self._addParameter( self.workflow, 'Platform', 'JDL', platform, 'Platform ( Operating System )' )
      else:
        return self._reportError( "Invalid platform", **kwargs )

    return S_OK()
Ejemplo n.º 3
0
Archivo: Job.py Proyecto: petricm/DIRAC
    def setPlatform(self, platform):
        """Developer function: sets the target platform, e.g. Linux_x86_64_glibc-2.5.
       This platform is in the form of what it is returned by the dirac-platform script
       (or dirac-architecture if your extension provides it)
    """
        kwargs = {"platform": platform}

        if not type(platform) == type(" "):
            return self._reportError("Expected string for platform", **kwargs)

        if not platform.lower() == "any":
            availablePlatforms = Resources.getDIRACPlatforms()
            if not availablePlatforms["OK"]:
                return self._reportError("Can't check for platform", **kwargs)
            if platform in availablePlatforms["Value"]:
                self._addParameter(self.workflow, "Platform", "JDL", platform, "Platform ( Operating System )")
            else:
                return self._reportError("Invalid platform", **kwargs)

        return S_OK()