This repository has been archived by the owner on Jul 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
catalog.go
226 lines (223 loc) · 9.54 KB
/
catalog.go
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
package storage
import (
"github.com/Azure/open-service-broker-azure/pkg/service"
)
const serviceGeneralPurposeV2 = "azure-storage-general-purpose-v2-storage-account" // nolint: lll
const serviceGeneralPurposeV1 = "azure-storage-general-purpose-v1-storage-account" // nolint: lll
const serviceBlobAllInOne = "azure-storage-blob-storage-account-and-container"
const serviceBlobAccount = "azure-storage-blob-storage-account"
const serviceBlobContainer = "azure-storage-blob-container"
// nolint: lll
func (m *module) GetCatalog() (service.Catalog, error) {
return service.NewCatalog([]service.Service{
service.NewService(
service.ServiceProperties{
ID: "9a3e28fe-8c02-49da-9b35-1b054eb06c95",
Name: serviceGeneralPurposeV2,
Description: "Azure general purpose v2 storage account; create your " +
"own containers, files, and tables within this account",
Metadata: service.ServiceMetadata{
DisplayName: "Azure Storage General Purpose V2 Storage Account",
ImageURL: "https://raw.githubusercontent.com/MicrosoftDocs/" +
"azure-docs/9eb1f875f3823af85e41ebc97e31c5b7202bf419/articles/media" +
"/index/Storage.svg?sanitize=true",
LongDescription: "Azure general purpose v2 storage account; create your " +
"own containers, files, and tables within this account (Preview)",
DocumentationURL: "https://docs.microsoft.com/en-us/azure/storage/",
SupportURL: "https://azure.microsoft.com/en-us/support/",
},
Bindable: true,
Tags: []string{"Azure", "Storage"},
},
m.generalPurposeV2Manager,
service.NewPlan(service.PlanProperties{
ID: "bc4f766a-c372-479c-b0b4-bd9d0546b3ef",
Name: "account",
Description: "Azure general purpose v2 storage account; create your " +
"own containers, files, and tables within this account",
Free: false,
Stability: service.StabilityPreview,
Metadata: service.ServicePlanMetadata{
DisplayName: "General Purpose V2 Storage Account",
Bullets: []string{"Azure general-purpose v2 storage account",
"Create your own containers, files, and tables within this account",
},
},
Schemas: service.PlanSchemas{
ServiceInstances: service.InstanceSchemas{
ProvisioningParametersSchema: generateProvisioningParamsSchema(serviceGeneralPurposeV2),
UpdatingParametersSchema: generateUpdatingParamsSchema(serviceGeneralPurposeV2),
},
},
}),
),
service.NewService(
service.ServiceProperties{
ID: "d10ea062-b627-41e8-a240-543b60030694",
Name: serviceGeneralPurposeV1,
Description: "Azure general purpose v1 storage account; create your " +
"own containers, files, and tables within this account",
Metadata: service.ServiceMetadata{
DisplayName: "Azure Storage General Purpose V1 Storage Account",
ImageURL: "https://raw.githubusercontent.com/MicrosoftDocs/" +
"azure-docs/9eb1f875f3823af85e41ebc97e31c5b7202bf419/articles/media" +
"/index/Storage.svg?sanitize=true",
LongDescription: "Azure general purpose v1 storage account; create your " +
"own containers, files, and tables within this account (Preview)",
DocumentationURL: "https://docs.microsoft.com/en-us/azure/storage/",
SupportURL: "https://azure.microsoft.com/en-us/support/",
},
Bindable: true,
Tags: []string{"Azure", "Storage"},
},
m.generalPurposeV1Manager,
service.NewPlan(service.PlanProperties{
ID: "9364d013-3690-4ce5-b0a2-b43d9b970b02",
Name: "account",
Description: "General-purpose v1 accounts provide access to all " +
"Azure Storage services, but may not have the latest features" +
"or the lowest per gigabyte pricing",
Free: false,
Stability: service.StabilityPreview,
Metadata: service.ServicePlanMetadata{
DisplayName: "General Purpose V1 Storage Account",
Bullets: []string{"Azure general-purpose v1 storage account",
"Create your own containers, files, and tables within this account",
},
},
Schemas: service.PlanSchemas{
ServiceInstances: service.InstanceSchemas{
ProvisioningParametersSchema: generateProvisioningParamsSchema(serviceGeneralPurposeV1),
UpdatingParametersSchema: generateUpdatingParamsSchema(serviceGeneralPurposeV1),
},
},
}),
),
service.NewService(
service.ServiceProperties{
ID: "1a5b4582-29a3-48c5-9cac-511fd8c52756",
Name: serviceBlobAccount,
Description: "Specialized Azure storage account for storing block " +
"blobs and append blobs",
ChildServiceID: "fb6ce656-c16d-4b48-aff9-286714298af8",
Metadata: service.ServiceMetadata{
DisplayName: "Azure Storage Blob Storage Account",
ImageURL: "https://raw.githubusercontent.com/MicrosoftDocs/" +
"azure-docs/9eb1f875f3823af85e41ebc97e31c5b7202bf419/articles/media" +
"/index/Storage.svg?sanitize=true",
LongDescription: "Specialized Azure storage account for storing block " +
"blobs and append blobs (Preview)",
DocumentationURL: "https://docs.microsoft.com/en-us/azure/storage/",
SupportURL: "https://azure.microsoft.com/en-us/support/",
},
Bindable: true,
Tags: []string{"Azure", "Storage"},
},
m.blobAccountManager,
service.NewPlan(service.PlanProperties{
ID: "98ae02ec-da21-4b09-b5e0-e2f9583d565c",
Name: "account",
Description: "Specialized Azure storage account for storing block " +
"blobs and append blobs; create your own blob containers within " +
"this account",
Free: false,
Stability: service.StabilityPreview,
Metadata: service.ServicePlanMetadata{
DisplayName: "Blob Storage Account",
Bullets: []string{"Specialized Azure storage account for storing " +
"block blobs and append blobs",
"Create your own containers, files, and tables within this account",
},
},
Schemas: service.PlanSchemas{
ServiceInstances: service.InstanceSchemas{
ProvisioningParametersSchema: generateProvisioningParamsSchema(serviceBlobAccount),
UpdatingParametersSchema: generateUpdatingParamsSchema(serviceBlobAccount),
},
},
}),
),
service.NewService(
service.ServiceProperties{
ID: "d799916e-3faf-4bdf-a48b-bf5012a2d38c",
Name: serviceBlobAllInOne,
Description: "A specialized Azure storage account for storing block " +
"blobs and append blobs; automatically provisions a blob container " +
"within the account",
Metadata: service.ServiceMetadata{
DisplayName: "Azure Storage Blob Storage Account And Container",
ImageURL: "https://raw.githubusercontent.com/MicrosoftDocs/" +
"azure-docs/9eb1f875f3823af85e41ebc97e31c5b7202bf419/articles/media" +
"/index/Storage.svg?sanitize=true",
LongDescription: "A specialized Azure storage account for storing block " +
"blobs and append blobs; automatically provisions a blob container " +
"within the account (Preview)",
DocumentationURL: "https://docs.microsoft.com/en-us/azure/storage/",
SupportURL: "https://azure.microsoft.com/en-us/support/",
},
Bindable: true,
Tags: []string{"Azure", "Storage"},
},
m.blobAllInOneManager,
service.NewPlan(service.PlanProperties{
ID: "6c3b587d-0f88-4112-982a-dbe541f30669",
Name: "all-in-one",
Description: "A specialized Azure storage account for storing block " +
"blobs and append blobs; automatically provisions a blob container " +
"within the account",
Free: false,
Stability: service.StabilityPreview,
Metadata: service.ServicePlanMetadata{
DisplayName: "Blob Storage Account And Container",
Bullets: []string{"A specialized Azure storage account for storing " +
"block blobs and append blobs; " +
"automatically provisions a blob container within the account",
},
},
Schemas: service.PlanSchemas{
ServiceInstances: service.InstanceSchemas{
ProvisioningParametersSchema: generateProvisioningParamsSchema(serviceBlobAllInOne),
UpdatingParametersSchema: generateUpdatingParamsSchema(serviceBlobAllInOne),
},
},
}),
),
service.NewService(
service.ServiceProperties{
ID: "fb6ce656-c16d-4b48-aff9-286714298af8",
Name: serviceBlobContainer,
Description: "A blob container inside an existing blob storage account",
ParentServiceID: "1a5b4582-29a3-48c5-9cac-511fd8c52756",
Metadata: service.ServiceMetadata{
DisplayName: "Azure Storage Blob Container",
ImageURL: "https://raw.githubusercontent.com/MicrosoftDocs/" +
"azure-docs/9eb1f875f3823af85e41ebc97e31c5b7202bf419/articles/media" +
"/index/Storage.svg?sanitize=true",
LongDescription: "A blob container inside an existing blob storage account" +
" (Preview)",
DocumentationURL: "https://docs.microsoft.com/en-us/azure/storage/",
SupportURL: "https://azure.microsoft.com/en-us/support/",
},
Bindable: true,
Tags: []string{"Azure", "Storage"},
},
m.blobContainerManager,
service.NewPlan(service.PlanProperties{
ID: "6b120780-c1f1-49ba-83c1-ffbd6b81df5e",
Name: "container",
Description: "A blob container inside an existing blob storage account",
Free: false,
Stability: service.StabilityPreview,
Metadata: service.ServicePlanMetadata{
DisplayName: "Blob Container",
Bullets: []string{"A blob container inside an existing blob storage account"},
},
Schemas: service.PlanSchemas{
ServiceInstances: service.InstanceSchemas{
ProvisioningParametersSchema: generateBlobContainerProvisioningParamsSchema(),
},
},
}),
),
}), nil
}