def _start_neutron_openvswitch_agent(self): service = 'neutron' template = 'neutron-openvswitch-agent' action_stop = 'START' RefCPSServiceExtent.host_template_instance_operate( service, template, action_stop)
def _check_service_proxy_status(self, service, template, aim_status): template_instance_info = RefCPSServiceExtent.list_template_instance(service, template) print template_instance_info if template_instance_info is None: print('Template instance info of Service<%s> Template<%s> is None.' % (service, template)) return False status = template_instance_info.get('instances')[0].get('hastatus') if status == aim_status: print_logger.info('SUCCESS to update template for service<%s>, template<%s>' % (service, template)) return True else: print_logger.error('FAILED to update template for service<%s>, template<%s>' % (service, template)) return False
def _check_service_proxy_status(self, service, template, aim_status): template_instance_info = RefCPSServiceExtent.list_template_instance( service, template) print template_instance_info if template_instance_info is None: print( 'Template instance info of Service<%s> Template<%s> is None.' % (service, template)) return False status = template_instance_info.get('instances')[0].get('hastatus') if status == aim_status: print_logger.info( 'SUCCESS to update template for service<%s>, template<%s>' % (service, template)) return True else: print_logger.error( 'FAILED to update template for service<%s>, template<%s>' % (service, template)) return False
def _start_neutron_openvswitch_agent(self): service = 'neutron' template = 'neutron-openvswitch-agent' action_stop = 'START' RefCPSServiceExtent.host_template_instance_operate(service, template, action_stop)