Changeset 32b4536


Ignore:
Timestamp:
Dec 1, 2011 2:47:11 PM (12 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
cebcdce
Parents:
db3da0b
Message:

Arbitrary image loading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/emulab_segment.py

    rdb3da0b r32b4536  
    358358                    return False
    359359            else:
    360                 self.status.append(operation_status(lnode,
    361                         operation_status.bad_param,
    362                         "Unsupported state %s" % state))
    363                 return False
     360                if '/' in state:
     361                    pid, iid = state.split('/')
     362                else:
     363                    pid = 'emulab-ops'
     364                    iid = state
     365
     366                p = {'nodes': pnode, 'imagename': iid, 'imageproj': pid,
     367                        'wait': False}
     368                code, result = self.emulab_call('node.reload', p)
     369                if code == 0:
     370                    self.status.append(operation_status(lnode,
     371                        operation_status.success, 'reloading'))
     372                    return True
     373                else:
     374                    self.status.append(operation_status(lnode,
     375                            operation_status.federant,
     376                            'Error code: %d' % code))
     377                    return False
    364378        else:
    365379            self.status.append(operation_status(lnode, operation_status.unsupp))
Note: See TracChangeset for help on using the changeset viewer.