Skip to content

Commit fd3bde3

Browse files
authored
feat: add bosh-cpi-config.yaml (SchemaStore#4703)
1 parent 4ea362b commit fd3bde3

File tree

4 files changed

+105
-0
lines changed

4 files changed

+105
-0
lines changed

src/api/json/catalog.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,11 @@
832832
"fileMatch": [".bowerrc"],
833833
"url": "https://json.schemastore.org/bowerrc.json"
834834
},
835+
{
836+
"name": "BOSH CPI Config",
837+
"description": "CPI-specific config for BOSH Director",
838+
"url": "https://json.schemastore.org/bosh-cpi-config.json"
839+
},
835840
{
836841
"name": "BOSH Deploy Config",
837842
"description": "Deploy config for BOSH CLI",
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://json.schemastore.org/bosh-cpi-config.json",
4+
"$comment": "This schema was built from information on https://bosh.io/docs/cpi-config/ and https://github.com/cloudfoundry/bosh/blob/0bb56927d04d3ce2b7f9d4283a9acd5ee2d6aaf3/src/bosh-director/lib/bosh/director/cpi_config/cpi.rb.",
5+
"$ref": "#/definitions/CPIConfig",
6+
"definitions": {
7+
"CPIConfig": {
8+
"type": "object",
9+
"title": "BOSH Director CPI Config",
10+
"description": "To define CPIs and CPI-specific properties for a BOSH Director.\n\nIntroduced in: v261",
11+
"properties": {
12+
"cpis": {
13+
"type": "array",
14+
"items": {
15+
"$ref": "#/definitions/CPIs"
16+
}
17+
}
18+
}
19+
},
20+
"CPIs": {
21+
"type": "object",
22+
"required": ["name", "type"],
23+
"properties": {
24+
"name": {
25+
"type": "string"
26+
},
27+
"type": {
28+
"type": "string"
29+
},
30+
"exec_path": {
31+
"type": "string"
32+
},
33+
"migrated_from": {
34+
"$ref": "#/definitions/MigratedFrom"
35+
},
36+
"properties": {
37+
"type": "object"
38+
}
39+
}
40+
},
41+
"MigratedFrom": {
42+
"type": "array",
43+
"description": "Allows for reusing IaaS resources from existing CPI configurations (such as pre-CPI config by using the special \"\" CPI name) without needing to re-upload stemcells or recreate all resources immediately.\n\nIntroduced in: v262.8.0 (https://github.com/cloudfoundry/bosh/commit/1a98a964f9c0238ba6a9b330e20a266cde9370c0)",
44+
"items": {
45+
"type": "object",
46+
"required": ["name"],
47+
"properties": {
48+
"name": {
49+
"type": "string"
50+
}
51+
}
52+
}
53+
}
54+
}
55+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# yaml-language-server: $schema=../../schemas/json/bosh-cpi-config.json
2+
cpis:
3+
- name: openstack-a1
4+
type: openstack
5+
exec_path: /var/vcap/jobs/openstack_cpi/bin/cpi
6+
migrated_from:
7+
- name: ''
8+
- name: oldenstack
9+
# Taken from: https://github.com/cloudfoundry/bosh-openstack-cpi-release/blob/222b7c0db9341b561ebfcbc817f1fc5b4e314e0d/src/openstack_cpi_golang/cpi/config/config_test.go#L21C1-L28C44
10+
properties:
11+
auth_url: the_auth_url
12+
username: the_username
13+
api_key: the_api_key
14+
domain: the_domain
15+
tenant: the_tenant
16+
region: the_region
17+
default_key_name: the_default_key_name
18+
stemcell_public_visibility: true
19+
20+
- name: vsphere-a1
21+
type: vsphere
22+
# Taken from: https://github.com/cloudfoundry/bosh-vsphere-cpi-release/blob/3a59941b634503c9720c00878105cd74965daac4/src/vsphere_cpi/spec/unit/bosh_release/jobs/cpi/templates/cpi.json.erb_spec.rb#L26-L50
23+
properties:
24+
host: vcenter-address
25+
user: vcenter-user
26+
password: vcenter-password
27+
enable_auto_anti_affinity_drs_rules: true
28+
enable_human_readable_name: true
29+
upgrade_hw_version: true
30+
vm_storage_policy_name: VM Storage Policy
31+
http_logging: true
32+
datacenters:
33+
- name: datacenter-1
34+
vm_folder: vm-folder
35+
template_folder: template-folder
36+
datastore_pattern: datastore-pattern
37+
datastore_cluster_pattern: datastore-cluster-pattern
38+
persistent_datastore_pattern: persistent-datastoreppattern
39+
persistent_datastore_cluster_pattern: persistent-datastore-cluster-pattern
40+
disk_path: disk-path
41+
clusters: [cluster-1]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# yaml-language-server: $schema=../../schemas/json/bosh-cpi-config.json
2+
cpis:
3+
- name: openstack-a1
4+
type: openstack

0 commit comments

Comments
 (0)