예제 #1
0
def getIMGVersion():
    ret = WebFunc.socketSend('127.0.0.1', 8888, 'get-r1s-sys-info')
    if ret:
        try:
            rets = ret.split(';')
            return {'ver': rets[0], 'upgrade': toBoolean(rets[1])}
        except:
            pass
    return {'ver': 'unknown', 'upgrade': False}
예제 #2
0
 def _isNeedUpgrade(self):
     ret = WebFunc.socketSend('127.0.0.1', 8888, 'is-need-upgrade')
     if ret:
         ret = ret.split(';')
         res = {'uptodate':UtilFunc.toBoolean(ret[0]) == False, 
                'version':'',
                'description':'',
                'force':ret[1]}
         return WebFunc.jsonResult(res)
     else:
         raise cherrypy.HTTPError(462, 'Operation Failed')
예제 #3
0
 def _systemUpgrade(self):
     ret = WebFunc.socketSend('127.0.0.1', 8888, 'upgrade-system')
     if not ret:
         raise cherrypy.HTTPError(462, 'Operation Failed')
     WebFunc.changeStatus()