+ elif channel == 'ResourceChanged':
+ datastr = m['data']
+ data = json.loads(datastr)
+ logger.info('ResourceChanged with cmd:{}'.format(data))
+ ref = apibase + '/resourcePools/' + data['resourcePoolId'] +\
+ '/resources/' + data['id']
+ cmd = imscmd.PubMessage2SMO(data=Message2SMO(
+ id=data['id'], ref=ref,
+ eventtype=data['notificationEventType'],
+ updatetime=data['updatetime']))
+ bus.handle(cmd)
+ elif channel == 'ConfigurationChanged':
+ datastr = m['data']
+ data = json.loads(datastr)
+ logger.info('ConfigurationChanged with cmd:{}'.format(data))
+ cmd = imscmd.Register2SMO(data=RegistrationMessage(id=data['id']))
+ bus.handle(cmd)
+ elif channel == 'OcloudChanged':
+ datastr = m['data']
+ data = json.loads(datastr)
+ logger.info('OcloudChanged with cmd:{}'.format(data))
+ if data['notificationEventType'] == NotificationEventEnum.CREATE:
+ cmd = imscmd.Register2SMO(data=RegistrationMessage(is_all=True))
+ bus.handle(cmd)