aboutsummaryrefslogtreecommitdiffstats
path: root/app/test/api/responders_test/test_data/cliques.py
blob: e1995cda972a6bff525701b9a8495b66034868f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
###############################################################################
# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems)   #
# and others                                                                  #
#                                                                             #
# All rights reserved. This program and the accompanying materials            #
# are made available under the terms of the Apache License, Version 2.0       #
# which accompanies this distribution, and is available at                    #
# http://www.apache.org/licenses/LICENSE-2.0                                  #
###############################################################################
from test.api.responders_test.test_data import base

URL = "/cliques"

WRONG_CLIQUE_ID = "58a2406e6a283a8bee15d43"
CORRECT_CLIQUE_ID = "58a2406e6a283a8bee15d43f"
NONEXISTENT_CLIQUE_ID = "58a2406e6a283a8bee15d43e"

WRONG_FOCAL_POINT = "58a2406e6a283a8bee15d43"
CORRECT_FOCAL_POINT = "58a2406e6a283a8bee15d43f"

WRONG_LINK_ID = "58a2406e6a283a8bee15d43"
CORRECT_LINK_ID = "58a2406e6a283a8bee15d43f"
NONEXISTENT_LINK_ID = "58a2406e6a283a8bee15d43e"

WRONG_FOCAL_POINT_TYPE = base.WRONG_OBJECT_TYPE
CORRECT_FOCAL_POINT_TYPE = base.CORRECT_OBJECT_TYPE

WRONG_LINK_TYPE = base.WRONG_LINK_TYPE
CORRECT_LINK_TYPE = base.CORRECT_LINK_TYPE

CLIQUES_WITH_SPECIFIC_ID = [
    {
        "environment": "Mirantis-Liberty-API",
        "focal_point_type": "vnic",
        "id": CORRECT_CLIQUE_ID
    }
]

CLIQUES_WITH_SPECIFIC_FOCAL_POINT_TYPE = [
    {
        "environment": "Mirantis-Liberty-API",
        "focal_point_type": CORRECT_FOCAL_POINT_TYPE,
        "id": "576c119a3f4173144c7a75c5"
    },
    {
        "environment": "Mirantis-Liberty-API",
        "focal_point_type": CORRECT_FOCAL_POINT_TYPE,
        "id": "576c119a3f4173144c7a75cc6"
    }
]

CLIQUES_WITH_SPECIFIC_FOCAL_POINT_TYPE_RESPONSE = {
    "cliques": CLIQUES_WITH_SPECIFIC_FOCAL_POINT_TYPE
}

CLIQUES_WITH_SPECIFIC_FOCAL_POINT = [
    {
        "environment": "Mirantis-Liberty-API",
        "focal_point": CORRECT_FOCAL_POINT,
        "id": "576c119a3f4173144c7a75c5"
    },
    {
        "environment": "Mirantis-Liberty-API",
        "focal_point": CORRECT_FOCAL_POINT,
        "id": "576c119a3f4173144c7a758e"
    }
]

CLIQUES_WITH_SPECIFIC_FOCAL_POINT_RESPONSE = {
    "cliques": CLIQUES_WITH_SPECIFIC_FOCAL_POINT
}

CLIQUES_WITH_SPECIFIC_LINK_TYPE = [
    {
        "links_detailed": [
            {
                "link_type": CORRECT_LINK_TYPE,
                "_id": "58a2405a6a283a8bee15d42f"
            },
            {
                "link_type": "vnic-vconnector",
                "_id": "58a240056a283a8bee15d3f2"
            }
        ],
        "environment": "Mirantis-Liberty-API",
        "focal_point_type": "vnic",
        "id": "576c119a3f4173144c7a75c5"
    },
    {
        "links_detailed": [
            {
                "link_type": CORRECT_LINK_TYPE,
                "_id": "58a2405a6a283a8bee15d42f"
            }
        ],
        "environment": "Mirantis-Liberty-API",
        "focal_point_type": "pnic",
        "id": "576c119a3f4173144c7a75c7"
    }
]

CLIQUES_WITH_SPECIFIC_LINK_TYPE_RESPONSE = {
    "cliques": CLIQUES_WITH_SPECIFIC_LINK_TYPE
}

CLIQUES_WITH_SPECIFIC_LINK_ID = [
    {
        "links_detailed": [
            {
                "_id": CORRECT_LINK_ID
            },
            {
                "_id": "58a240056a283a8bee15d3f2"
            }
        ],
        "environment": "Mirantis-Liberty-API",
        "focal_point_type": "vnic",
        "id": "576c119a3f4173144c7a75c5"
    },
    {
        "links_detailed": [
            {
                "_id": CORRECT_LINK_ID
            }
        ],
        "environment": "Mirantis-Liberty-API",
        "focal_point_type": "pnic",
        "id": "576c119a3f4173144c7a75c7"
    }
]

CLIQUES_WITH_SPECIFIC_LINK_ID_RESPONSE = {
    "cliques": CLIQUES_WITH_SPECIFIC_LINK_ID
}

# response
CLIQUES = [{
    "links_detailed": [
        {
            "link_type": "instance-vnic",
            "_id": "58a2405a6a283a8bee15d42f"
        },
        {
            "link_type": "vnic-vconnector",
            "_id": "58a240056a283a8bee15d3f2"
        }
    ],
    "environment": "Mirantis-Liberty-API",
    "focal_point_type": "vnic",
    "id": "576c119a3f4173144c7a75c5"
    },
    {
    "links_detailed": [
        {
            "link_type": "instance-vnic",
            "_id": "58a2405a6a283a8bee15d42f"
        },
        {
            "link_type": "vnic-vconnector",
            "_id": "58a240056a283a8bee15d3f2"
        }
    ],
    "environment": "Miratis-Liberty-API",
    "focal_point_type": "pnic",
    "id": "576c119a3f4173144c7a75c6"
    }
]

CLIQUES_RESPONSE = {
    "cliques": CLIQUES
}