Ignore:
Timestamp:
Dec 1, 2011 5:10:32 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
7f57435
Parents:
32b4536
Message:

Track initial state image name; move attributes into emulab_access:
namespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_segment.py

    r32b4536 rcebcdce  
    3333                        version=self.osversion)
    3434            if self.image and rv:
    35                 rv.set_attribute('image', self.image)
     35                rv.set_attribute('emulab_access:image', self.image)
    3636            return rv
    3737
     
    295295                raise service_error(service_error.internal,
    296296                        "Cannot get node mapping of segment:%s/%s" % (pid, eid))
    297     def get_image(self, node, top):
     297    def get_initial_image(self, node, top):
    298298        for e in top.elements:
    299299            if isinstance(e, topdl.Computer):
    300300                if node == e.name:
    301                     if e.os:
    302                         return e.os[0].get_attribute('image')
     301                    if e.os and len(e.os) == 1:
     302                        return e.os[0].get_attribute(
     303                                'emulab_access:initial_image')
    303304        return None
    304305
     
    326327                return False
    327328            elif state == 'initial':
    328                 image = self.get_image(lnode, top)
     329                image = self.get_initial_image(lnode, top)
    329330                if image:
    330331                    pid, iid = image.split('/')
Note: See TracChangeset for help on using the changeset viewer.