Beispiel #1
0
 def setUp(self):
     #Creating test configuration file
     self.testCfgFileName = 'test.cfg'
     cfgContent = '''
 DIRAC
 {
   Setup=TestSetup
   Setups
   {
     TestSetup
     {
       WorkloadManagement=MyWM
     }
   }
 }
 Systems
 {
   WorkloadManagement
   {
     MyWM
     {
       URLs
       {
         Service1 = dips://server1:1234/WorkloadManagement/Service1
         Service2 = dips://$MAINSERVERS$:5678/WorkloadManagement/Service2
       }
       FailoverURLs
       {
         Service2 = dips://failover1:5678/WorkloadManagement/Service2
       }
     }
   }
 }
 Operations{
   Defaults
   {
     MainServers = gw1, gw2
   }
 }
 '''
     with open(self.testCfgFileName, 'w') as f:
         f.write(cfgContent)
     gConfig = ConfigurationClient(fileToLoadList=[
         self.testCfgFileName
     ])  #we replace the configuration by our own one.
     self.setup = gConfig.getValue('/DIRAC/Setup', '')
     self.wm = gConfig.getValue(
         'DIRAC/Setups/' + self.setup + '/WorkloadManagement', '')
Beispiel #2
0
 def setUp( self ):
   #Creating test configuration file
   self.testCfgFileName = 'test.cfg'
   cfgContent='''
   DIRAC
   {
     Setup=TestSetup
     Setups
     {
       TestSetup
       {
         WorkloadManagement=MyWM
       }
     }
   }
   Systems
   {
     WorkloadManagement
     {
       MyWM
       {
         URLs
         {
           Service1 = dips://server1:1234/WorkloadManagement/Service1
           Service2 = dips://$MAINSERVERS$:5678/WorkloadManagement/Service2
         }
         FailoverURLs
         {
           Service2 = dips://failover1:5678/WorkloadManagement/Service2
         }
       }
     }
   }
   Operations{
     Defaults
     {
       MainServers = gw1, gw2
     }
   }
   '''
   with open(self.testCfgFileName, 'w') as f:
     f.write(cfgContent)
   gConfig = ConfigurationClient(fileToLoadList = [self.testCfgFileName])  #we replace the configuration by our own one.
   self.setup = gConfig.getValue( '/DIRAC/Setup', '' )
   self.wm = gConfig.getValue('DIRAC/Setups/' + self.setup +'/WorkloadManagement', '')
Beispiel #3
0
    def setUp(self):
        # Creating test configuration file
        self.testCfgFileName = 'test.cfg'
        cfgContent = '''
    DIRAC
    {
      Setup=TestSetup
      Setups
      {
        TestSetup
        {
          WorkloadManagement=MyWM
        }
      }
    }
    Systems
    {
      WorkloadManagement
      {
        MyWM
        {
          URLs
          {
            Service1 = dips://server1:1234/WorkloadManagement/Service1
            Service2 = dips://$MAINSERVERS$:5678/WorkloadManagement/Service2
          }
          FailoverURLs
          {
            Service2 = dips://failover1:5678/WorkloadManagement/Service2
          }
        }
      }
    }
    Operations{
      Defaults
      {
        Pilot
        {
          Project = LHCb
          GenericPilotDN = /DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=doe/CN=111213/CN=Joe Doe
          GenericPilotGroup = xxx_pilot
        }

        MainServers = gw1, gw2
      }
    }
    Registry
    {
      Users
      {
        ttester
        {
          DN = /DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=ttester/CN=696969/CN=Thomas Tester
          CA = /DC=ch/DC=cern/CN=CERN Grid Certification Authority
          Email = [email protected]
        }
        franekbolek
        {
          DN = /DC=ch/DC=voodo/OU=Organic Units/OU=Users/CN=franekbolek/CN=111122/CN=Franek Bolek
          CA = /DC=ch/DC=voodo/CN=Voodo Grid Certification Authority
          Email = [email protected]
        }
      }
      Groups
      {
        lhcb_pilot
        {
          #@@-host - /DC=ch/DC=voodo/OU=computers/CN=brabra.voodo.pl
          Users = franekbolek
          Users += ttester
          Properties = GenericPilot
          Properties += LimitedDelegation
          VOMSRole = /lhcb/Role=pilot
          #@@-ggg@diracAdmin - 2015-07-07 13:40:55
          VO = lhcb
        }
      }
    }
    '''
        with open(self.testCfgFileName, 'w') as f:
            f.write(cfgContent)
        gConfig = ConfigurationClient(fileToLoadList=[
            self.testCfgFileName
        ])  # we replace the configuration by our own one.
        self.setup = gConfig.getValue('/DIRAC/Setup', '')
        self.wm = gConfig.getValue(
            'DIRAC/Setups/' + self.setup + '/WorkloadManagement', '')
  def setUp(self):
    # Creating test configuration file
    self.testCfgFileName = 'test.cfg'
    cfgContent = '''
    DIRAC
    {
      Setup=TestSetup
      Setups
      {
        TestSetup
        {
          WorkloadManagement=MyWM
        }
      }
    }
    Systems
    {
      WorkloadManagement
      {
        MyWM
        {
          URLs
          {
            Service1 = dips://server1:1234/WorkloadManagement/Service1
            Service2 = dips://$MAINSERVERS$:5678/WorkloadManagement/Service2
          }
          FailoverURLs
          {
            Service2 = dips://failover1:5678/WorkloadManagement/Service2
          }
        }
      }
    }
    Operations{
      Defaults
      {
        Pilot
        {
          Project = LHCb
          GenericPilotDN = /DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=doe/CN=111213/CN=Joe Doe
          GenericPilotGroup = xxx_pilot
        }

        MainServers = gw1, gw2
      }
    }
    Registry
    {
      Users
      {
        ttester
        {
          DN = /DC=ch/DC=cern/OU=Organic Units/OU=Users/CN=ttester/CN=696969/CN=Thomas Tester
          CA = /DC=ch/DC=cern/CN=CERN Grid Certification Authority
          Email = [email protected]
        }
        franekbolek
        {
          DN = /DC=ch/DC=voodo/OU=Organic Units/OU=Users/CN=franekbolek/CN=111122/CN=Franek Bolek
          CA = /DC=ch/DC=voodo/CN=Voodo Grid Certification Authority
          Email = [email protected]
        }
      }
      Groups
      {
        lhcb_pilot
        {
          #@@-host - /DC=ch/DC=voodo/OU=computers/CN=brabra.voodo.pl
          Users = franekbolek
          Users += ttester
          Properties = GenericPilot
          Properties += LimitedDelegation
          VOMSRole = /lhcb/Role=pilot
          #@@-ggg@diracAdmin - 2015-07-07 13:40:55
          VO = lhcb
        }
      }
    }
    '''
    with open(self.testCfgFileName, 'w') as f:
      f.write(cfgContent)
    gConfig = ConfigurationClient(fileToLoadList=[self.testCfgFileName])  # we replace the configuration by our own one.
    self.setup = gConfig.getValue('/DIRAC/Setup', '')
    self.wm = gConfig.getValue('DIRAC/Setups/' + self.setup + '/WorkloadManagement', '')