goerz / gc3pie

Automatically exported from code.google.com/p/gc3pie
0 stars 0 forks source link

rename `resource` to `subresource` in OpenstackLRMS.submit_job #440

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In backends/openstack.py, lines 730--753, the identifier name
`resource` is really used to mean a *subresource*.  Rename
accordingly::

        for vm_id, resource in self.subresources.items():
            if not resource.updated:
                # The VM is probably still booting, let's skip to the
                # next one and add it to the list of "pending" VMs.
                pending_vms.add(vm_id)
                continue
            try:
                # Check that the required image id and instance type
                # are correct
                vm = self._get_vm(vm_id)
                if vm.image['id'] != image_id:
                    continue
                resource.submit_job(job)
                job.os_instance_id = vm_id
                job.changed = True
                gc3libs.log.info(
                    "Job successfully submitted to remote resource %s.",
                    resource.name)
                return job
            except gc3libs.exceptions.LRMSSubmitError, ex:
                gc3libs.log.debug(
                    "Ignoring error while submit to resource %s: %s. ",
                    resource.name, str(ex))

Original issue reported on code.google.com by riccardo.murri@gmail.com on 19 May 2014 at 1:57

GoogleCodeExporter commented 9 years ago
Done.

Original comment by riccardo.murri@gmail.com on 30 Jun 2014 at 2:42

GoogleCodeExporter commented 9 years ago
Fixed in SVN r3921

Original comment by riccardo.murri@gmail.com on 30 Jun 2014 at 2:45