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
172
173
174
|
# -*- coding: UTF-8 -*-
from pulsar.schema import *
'''
Topic - VCP Far Edge Namespace Provisioning
Payload
Format: JSON
Example Content:
{
"reportName": “vcp_fe_namespace”,
"reportDescription": null,
"reportGeneratedOn": "2020-04-28T09:06:32.1962088-04:00",
"rowCount": 1,
"reportDataRows": [{
"cluster”: "wsbomagj-d654321-001",
“namespace”: “WSBOMAGJ-441352VZWcVDU-Y-SM-x-001”
“location”: 654321
“created_at”: 2020-01-07 04:16:15.743617
}]
}
'''
class RemoteRegion(Record):
cluster = String()
namespace = String()
location = String()
created_at = String()
class NameSpaceMessage(Record):
reportName = String()
reportDescription = String()
reportGeneratedOn = String()
rowCount = Integer()
reportDataRows = Array(RemoteRegion())
'''
Topic - VCP Far Edge Cluster Status
Payload
Format: JSON
Example Content:
{
"reportName": “vcp_fe_cluster_status”,
"reportDescription": null,
"reportGeneratedOn": "2020-04-28T09:06:32.1962088-04:00",
"rowCount": 1,
"reportDataRows": [{
“name”: "wsbomagj-d654321-001",
“description”: NE CONCORD 8_NH
“location”: 654321
“software version”: 19.12
“availability”: online
“deploy_status”: complete
“created_at”: 2020-01-07 04:16:15.743617
“updated_at”: 2020-01-07 06:03:10.854598
}]
}
'''
class ClusterStatus(Record):
name = String()
description = String()
software_version = String()
location = String()
availability = String()
deploy_status = String()
created_at = String()
updated_at = String()
class ClusterStatusMessage(Record):
reportName = String()
reportDescription = String()
reportGeneratedOn = String()
rowCount = Integer()
reportDataRows = Array(ClusterStatus())
'''
Topic - VCP Far Edge Kubeconfig Token
Payload
Format: JSON
Example Content:
{
"reportName": “vcp_fe_kubeconfig”,
"reportDescription": null,
"reportGeneratedOn": "2020-04-28T09:06:32.1962088-04:00",
"rowCount": 1,
"reportDataRows": [{
“cluster”: "wsbomagj-d654321-001",
“namespace”: “WSBOMAGJ-441352VZWcVDU-Y-SM-x-001”
“location”: 654321
“kubeconfig”: <Example kubeconfig>
“created_at”: 2020-01-07 04:16:15.743617
}]
}
---
Example kubeconfig:
apiVersion: v1
kind: Config
users:
- name: ldap-user
user:
token: eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJub2tpYSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJzYTEtdG9rZW4tbW5mMmoiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoic2ExIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiZTA5YTkwMDItMTg0Zi0xMWVhLWE5NzYtMDgwMDI3YTFjODc3Iiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Om5va2lhOnNhMSJ9.e9uD5kMmAT0HRboSTAbH5xlkETkltLclVQ2GedvoeUmH76WB6G5kGWQrhJjkjpMtPDKxWp6wTzZdEXXwGYGdB6aXbaxcAmau1qid5NGz725BtaoRbSVS2Uk6XrOSNfycFzqc8Z7GTX81VtKKSPYnjeMo47W6FqHw6qk0NEpLLxbpGfJHz8w2KZQiuvI-JRQXtA3PHW3tEaWq3ME3XnYgHNSRJmoiKA99bWjN-HKoOsBDMjhX7kw_VtycRYJ1gbqXmVsSl7BuAQjoplnLN_stRt7ZgpsV4aqmZueqJqHaglB91XOeqe_JcD5unLMb3B5VXpEXPp3V6tjLIyVD8F8XbA
clusters:
- cluster:
server: https://<IPv6>:8443
name: wsbomagj-d654321-001
contexts:
- context:
cluster: wsbomagj-d654321-001
user: ldap-user
namespace: WSBOMAGJ-441352VZWcVDU-Y-SM-x-001
name: ldap-user
current-context: ldab-user
'''
class Kubeconfig(Record):
transactionId = String()
cluster = String()
namespace = String()
location = String()
kubeconfig = String()
created_at = String()
updated_at = String()
class KubeconfigMessage(Record):
reportName = String()
reportDescription = String()
reportGeneratedOn = String()
rowCount = Integer()
reportDataRows = Array(Kubeconfig())
'''
Topic - VCP Far Edge Image Status
Payload
Format: JSON
Example Content:
Image Upload Example
{
"reportName": “vcp_fe_imagestatus”,
"reportDescription": null,
"reportGeneratedOn": "2020-04-28T09:06:32.1962088-04:00",
"rowCount": 2,
"reportDataRows": [{
“cluster”: "wsbomagj-d654321-001",
“image”: “i1”
“action”: “UPLOAD”
“status”: “SUCCESS”
“message”:”Image Successfully Deleted”
“created_at”: 2020-01-07 04:16:15.743617
}
{
“cluster”: "wsbomagj-d654321-001",
“image”: “i2”
“action”: “UPLOAD”
“status”: “FAILED”
“message”:”Image Not Present in Artifactory”
“created_at”: 2020-01-07 04:16:15.743617
}]
}
'''
class ImageStatus(Record):
cluster = String()
image = String()
action = String()
status = String()
message = String()
created_at = String()
class ImagesStatusMessage(Record):
reportName = String()
transactionId = String()
reportDescription = String()
reportGeneratedOn = String()
rowCount = Integer()
reportDataRows = Array(ImageStatus())
|