Exemple #1
0
    def verify_qos_config_in_all_vrouters(self):
        vrouter_qcs = {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            vrouter_qcs[compute] = inspect_h.get_vrouter_qos_config(
                self.id[compute])
            if not vrouter_qcs[compute]:
                self.logger.warn(
                    'Qos config %s not found in Compute vrouter %s' %
                    (self.id[compute], compute))
                return False
        vrouter_qc_reference = vrouter_qcs[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        for compute, vrouter_qc in vrouter_qcs.iteritems():
            self.id[compute] = vrouter_qc['id']
            (result, mismatches) = compare_dict(vrouter_qc,
                                                vrouter_qc_reference,
                                                ignore_keys=['id'])
            if not result:
                self.logger.warn(
                    'On Compute %s(vrouter), mismatch in qos config'
                    ' entries, Mismatched items: %s' % (compute, mismatches))
                return False
        self.logger.info(
            'Validated Qos Config UUID %s in vrouter of all computes' %
            (self.uuid))
        return True
Exemple #2
0
    def verify_fc_in_all_vrouters(self):
        vrouter_fcs = {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            vrouter_fcs[compute] = inspect_h.get_vrouter_forwarding_class(
                self.id[compute])
            if not vrouter_fcs[compute]:
                self.logger.warn('Qos FC %s not found in Compute vrouter %s' %
                                 (self.id[compute], compute))
                return False
        vrouter_fc_reference = vrouter_fcs[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        for compute, vrouter_fc in vrouter_fcs.iteritems():
            self.id[compute] = vrouter_fc['id']
            (result,
             mismatches) = compare_dict(vrouter_fc,
                                        vrouter_fc_reference,
                                        ignore_keys=['id', 'qos_queue'])
            if not result:
                self.logger.warn(
                    'On Compute %s(vrouter), mismatch found in qos fc'
                    'entries, Unmatched items: %s' % (compute, mismatches))
                return False
        self.logger.info('Validated Qos FC UUID %s in vrouters of all '
                         'computes' % (self.uuid))
        return True
Exemple #3
0
    def verify_qos_config_in_all_agents(self):
        agent_qcs = {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            agent_qcs[compute] = inspect_h.get_agent_qos_config(self.uuid)
            if not agent_qcs[compute]:
                self.logger.warn('Qos Config %s not found in Compute %s' %
                                 (self.uuid, compute))
                return False
        agent_qc_reference = agent_qcs[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        for (compute, agent_qc) in agent_qcs.iteritems():
            self.id[compute] = agent_qc['id']
            (result, mismatches) = compare_dict(agent_qc,
                                                agent_qc_reference,
                                                ignore_keys=['id'])
            if not result:
                self.logger.warn('On Compute %s, mismatch found in qos config'
                                 'entries, Unmatched items: %s' %
                                 (compute, mismatches))
                return False
        self.logger.info('Validated Qos Config UUID %s in agents of all '
                         ' computes' % (self.uuid))
        return True
Exemple #4
0
    def _verify_fc_in_all_agents(self):
        agent_fcs = {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            agent_fcs[compute] = inspect_h.get_agent_forwarding_class(
                self.uuid)
            if not agent_fcs[compute]:
                msg = 'Qos FC %s not found in Compute %s' % (self.uuid, compute)
                self.logger.warn(msg)
                return False, msg
        agent_fc_reference = agent_fcs[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        self.id = {}
        for compute, agent_fc in agent_fcs.iteritems():
            self.id[compute] = agent_fc['id']
            (result, mismatches) = compare_dict(agent_fc, agent_fc_reference,
                                                ignore_keys=['id'])
            if not result:
                msg = 'On Compute %s, mismatch found in qos fc entries, Unmatched items: %s' %\
                         (compute, mismatches)
                self.logger.error(msg)
                raise NameError(msg)
        msg = 'Validated Qos FC UUID %s in agents of all computes' % (self.uuid)
        self.logger.info(msg)
        return True, msg
Exemple #5
0
    def verify_qq_in_all_agents(self):
        agent_qos_queues= {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            agent_qos_queues[compute] = inspect_h.get_agent_qos_queue(
                self.uuid)
            if not agent_qos_queues[compute]:
                self.logger.warn('Qos Queue %s not found in Compute %s' % (
                    self.uuid, compute))
                return False
        agent_qq_reference = agent_qos_queues[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        for compute, agent_qq in agent_qos_queues.items():
            self.id[compute] = agent_qq['id']
            (result, mismatches) = compare_dict(agent_qq, agent_qq_reference)
            if not result:
                self.logger.warn('On Compute %s, mismatch found in qos queue'
                                 'entries, Unmatched items: %s' % (compute, mismatches))
                return False
        self.logger.info('Validated Qos Queue UUID %s in agents of all '
                         ' computes' % (self.uuid))
        return True
    def verify_qos_config_in_all_agents(self):
        agent_qcs = {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            agent_qcs[compute] = inspect_h.get_agent_qos_config(self.uuid)
            if not agent_qcs[compute]:
                self.logger.warn('Qos Config %s not found in Compute %s' % (
                    self.uuid, compute))
                return False
        agent_qc_reference = agent_qcs[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        for (compute, agent_qc) in agent_qcs.iteritems():
            self.id[compute] = agent_qc['id']
            (result, mismatches) = compare_dict(agent_qc, agent_qc_reference,
                                                ignore_keys=['id'])
            if not result:
                self.logger.warn('On Compute %s, mismatch found in qos config'
                                 'entries, Unmatched items: %s' % (compute, mismatches))
                return False
        self.logger.info('Validated Qos Config UUID %s in agents of all '
                         ' computes' % (self.uuid))
        return True
    def verify_qos_config_in_all_vrouters(self):
        vrouter_qcs = {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            vrouter_qcs[compute] = inspect_h.get_vrouter_qos_config(
                self.id[compute])
            if not vrouter_qcs[compute]:
                self.logger.warn('Qos config %s not found in Compute vrouter %s' % (
                    self.id[compute], compute))
                return False
        vrouter_qc_reference = vrouter_qcs[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        for compute, vrouter_qc in vrouter_qcs.iteritems():
            self.id[compute] = vrouter_qc['id']
            (result, mismatches) = compare_dict(vrouter_qc, vrouter_qc_reference,
                                                ignore_keys=['id'])
            if not result:
                self.logger.warn('On Compute %s(vrouter), mismatch in qos config'
                                 ' entries, Mismatched items: %s' % (compute, mismatches))
                return False
        self.logger.info('Validated Qos Config UUID %s in vrouter of all computes' % (
                         self.uuid))
        return True
Exemple #8
0
    def verify_fc_in_all_vrouters(self):
        vrouter_fcs = {}
        for compute in self.inputs.compute_ips:
            inspect_h = self.agent_inspect[compute]
            vrouter_fcs[compute] = inspect_h.get_vrouter_forwarding_class(
                self.id[compute])
            if not vrouter_fcs[compute]:
                self.logger.warn('Qos FC %s not found in Compute vrouter %s' % (
                    self.id[compute], compute))
                return False
        vrouter_fc_reference = vrouter_fcs[self.inputs.compute_ips[0]]

        # Check that all values are same across all agents
        for compute, vrouter_fc in vrouter_fcs.iteritems():
            self.id[compute] = vrouter_fc['id']
            (result, mismatches) = compare_dict(vrouter_fc, vrouter_fc_reference,
                                                ignore_keys=['id', 'qos_queue'])
            if not result:
                self.logger.warn('On Compute %s(vrouter), mismatch found in qos fc'
                                 'entries, Unmatched items: %s' % (compute, mismatches))
                return False
        self.logger.info('Validated Qos FC UUID %s in vrouters of all '
                         'computes' % (self.uuid))
        return True