Beispiel #1
0
    def get(cloud_model, cp_name):
        for elem_cp in CloudModel.control_planes(cloud_model):
            cur_name = ControlPlane.get_name(elem_cp)
            if cur_name == cp_name:
                return elem_cp

        return None
    def is_resource_node_active(cloud_model, elem_s):
        control_planes = CloudModel.control_planes(cloud_model)

        control_plane = ResourceNode.get_control_plane_id(elem_s)
        node_type = ResourceNode.get_type(elem_s)
        for elem_cp in control_planes:
            cp_name = ControlPlane.get_name(elem_cp)

            if cp_name.lower() != control_plane.lower():
                continue

            if not ResourceNode.is_active(elem_cp, node_type, elem_s):
                return False

        return True
Beispiel #3
0
    def is_resource_node_active(cloud_model, elem_s):
        control_planes = CloudModel.control_planes(cloud_model)

        control_plane = ResourceNode.get_control_plane_id(elem_s)
        node_type = ResourceNode.get_type(elem_s)
        for elem_cp in control_planes:
            cp_name = ControlPlane.get_name(elem_cp)

            if cp_name.lower() != control_plane.lower():
                continue

            if not ResourceNode.is_active(elem_cp, node_type, elem_s):
                return False

        return True