Exemple #1
0
 def test_bags(self):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
     project = cts.get_project(settings.CTS_PROJECT_ID)
     bags = list(project.get_bags())
     self.assertTrue(len(bags) > 0)
     bag = bags[0]
     self.assertTrue(bag.data['id'])
Exemple #2
0
    def test_bag_instances(self):
        cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
        project = cts.get_project(settings.CTS_PROJECT_ID)
        bag = list(project.get_bags())[0]

        instances = list(bag.get_bag_instances())
        self.assertTrue(len(instances) > 0)
Exemple #3
0
 def handle(self, *args, **options):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
     for sr in cts.get_service_requests(settings.CTS_QUEUE, settings.CTS_SERVICE_TYPE):
         bag_instance_id = sr.data["requestParameters"]["baginstancekey"]
         bag = cts.get_bag_instance(bag_instance_id)
         bag_dir = bag.data["filepath"]
         print "service request %s with status %s to load %s" % (sr.data["key"], sr.data["status"], bag_dir)
Exemple #4
0
    def test_bag_instances(self):
        cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD,
                  settings.CTS_URL, CTSTest.VERIFY_SSL)
        project = cts.get_project(settings.CTS_PROJECT_ID)
        bag = list(project.get_bags())[0]

        instances = list(bag.get_bag_instances())
        self.assertTrue(len(instances) > 0)
Exemple #5
0
 def test_bags(self):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD,
               settings.CTS_URL, CTSTest.VERIFY_SSL)
     project = cts.get_project(settings.CTS_PROJECT_ID)
     bags = list(project.get_bags())
     self.assertTrue(len(bags) > 0)
     bag = bags[0]
     self.assertTrue(bag.data['id'])
 def handle(self, *args, **options):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
     for sr in cts.get_service_requests(settings.CTS_QUEUE,
                                        settings.CTS_SERVICE_TYPE):
         bag_instance_id = sr.data['requestParameters']['baginstancekey']
         bag = cts.get_bag_instance(bag_instance_id)
         bag_dir = bag.data['filepath']
         print "service request %s with status %s to load %s" % (sr.data['key'], sr.data['status'], bag_dir)
Exemple #7
0
    def handle(self, *args, **options):
        cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
        ndnp = cts.get_project(settings.CTS_PROJECT_ID)

        for bag in ndnp.get_bags():
            for instance in bag.get_bag_instances():
                for instance_type in instance.data['bagInstanceTypes']:
                    if instance_type['name'] == 'public access':
                        print instance.data['filepath']
    def handle(self, *args, **options):
        cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
        ndnp = cts.get_project(settings.CTS_PROJECT_ID)

        for bag in ndnp.get_bags():
            for instance in bag.get_bag_instances():
                for instance_type in instance.data['bagInstanceTypes']:
                    if instance_type['name'] == 'public access':
                        print instance.data['filepath']
 def handle(self, *args, **options):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
     for sr in cts.get_service_requests(settings.CTS_QUEUE, settings.CTS_SERVICE_TYPE):
         bag_instance_id = sr.data['requestParameters']['baginstancekey']
         bag = cts.get_bag_instance(bag_instance_id)
         bag_dir = bag.data['filepath']
         self.stdout.write(
             "service request %s with status %s to load %s" % (sr.data['key'], sr.data['status'], bag_dir)
         )
Exemple #10
0
 def test_project(self):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD, settings.CTS_URL)
     project = cts.get_project(settings.CTS_PROJECT_ID)
Exemple #11
0
 def test_project(self):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD,
               settings.CTS_URL, CTSTest.VERIFY_SSL)
     cts.get_project(settings.CTS_PROJECT_ID)
 def test_project(self):
     cts = CTS(settings.CTS_USERNAME, settings.CTS_PASSWORD,
               settings.CTS_URL)
     project = cts.get_project(settings.CTS_PROJECT_ID)
 def test_project(self):
     cts = CTS(settings.CTS_USERNAME,
               settings.CTS_PASSWORD,
               settings.CTS_URL,
               CTSTest.VERIFY_SSL)
     cts.get_project(settings.CTS_PROJECT_ID)