def get_introspect_for_service(self, service, host_ip): if service == 'contrail-svc-monitor': inspect = SvcMonInspect(host_ip, port=CONTRAIL_INTROSPECT_PORTS[service], logger=self.logger, args=self.inputs) elif service == 'contrail-vrouter-agent': agent_inspect = AgentInspect(host_ip, CONTRAIL_INTROSPECT_PORTS[service], self.logger, inputs=self.inputs) elif service in ['contrail-query-engine', 'contrail-analytics-api', 'contrail-collector']: inspect = VerificationOpsSrvIntrospect(host_ip, CONTRAIL_INTROSPECT_PORTS[service], self.logger, inputs=self.inputs) elif service == 'contrail-dns': inspect = DnsAgentInspect(host_ip, CONTRAIL_INTROSPECT_PORTS[service], self.logger, args=self.inputs) elif service == 'contrail-control': inspect = ControlNodeInspect(host_ip, CONTRAIL_INTROSPECT_PORTS[service], self.logger, args=self.inputs) elif service in ['contrail-api', 'contrail-schema']: inspect = VerificationUtilBase(host_ip, CONTRAIL_INTROSPECT_PORTS[service], drv=XmlDrv, logger=self.logger, args=self.inputs) else: inspect = None return inspect
def get_dns_agent_inspect_handle(self, host): if host not in self.dnsagent_inspect: self.dnsagent_inspect[host] = DnsAgentInspect(host, self.inputs.dns_port, logger=self.logger, args=self.inputs, protocol=self.inputs.introspect_protocol) return self.dnsagent_inspect[host]
def update_inspect_handles(self): self.api_server_inspects.clear() self.cn_inspect.clear() self.dnsagent_inspect.clear() self.agent_inspect.clear() self.ops_inspects.clear() self.ds_inspect.clear() for cfgm_ip in self.inputs.cfgm_ips: self.api_server_inspects[cfgm_ip] = VNCApiInspect( cfgm_ip, args=self.inputs, logger=self.inputs.logger) self.api_server_inspect = VNCApiInspect(cfgm_ip, args=self.inputs, logger=self.inputs.logger) for bgp_ip in self.inputs.bgp_ips: self.cn_inspect[bgp_ip] = ControlNodeInspect( bgp_ip, logger=self.inputs.logger) self.dnsagent_inspect[bgp_ip] = DnsAgentInspect( bgp_ip, logger=self.inputs.logger) for compute_ip in self.inputs.compute_ips: self.agent_inspect[compute_ip] = AgentInspect( compute_ip, logger=self.inputs.logger) for collector_ip in self.inputs.collector_ips: self.ops_inspects[collector_ip] = VerificationOpsSrv( collector_ip, logger=self.inputs.logger) self.ops_inspect = VerificationOpsSrv(self.inputs.collector_ip, logger=self.inputs.logger) for collector_name in self.inputs.collector_names: self.ops_inspects[collector_name] = VerificationOpsSrv( collector_ip, logger=self.inputs.logger) self.analytics_obj = AnalyticsVerification(self.inputs, self.api_server_inspect, self.cn_inspect, self.agent_inspect, self.ops_inspects, logger=self.inputs.logger) for ds_ip in self.inputs.ds_server_ip: self.ds_inspect[ds_ip] = VerificationDsSrv( ds_ip, logger=self.inputs.logger) self.ds_verification_obj = DiscoveryVerification( self.inputs, self.api_server_inspect, self.cn_inspect, self.agent_inspect, self.ops_inspects, self.ds_inspect, logger=self.inputs.logger)
def get_dns_agent_inspect_handle(self, host): if host not in self.dnsagent_inspect: self.dnsagent_inspect[host] = DnsAgentInspect(host, self.inputs.dns_port, logger=self.logger) return self.dnsagent_inspect[host]