|
| 1 | +--- |
| 2 | +# Schema for metadata file "resources.yaml" accompanying a |
| 3 | +# cloud staged source. |
| 4 | +# |
| 5 | +# For general information about staging directories, see: |
| 6 | +# https://release-engineering.github.io/pushsource/sources/staged.html |
| 7 | +# |
| 8 | + |
| 9 | +$schema: http://json-schema.org/draft-07/schema# |
| 10 | +$id: http://release-engineering.github.io/pushsource/cloud-schema.yaml |
| 11 | + |
| 12 | + |
| 13 | +############################################################################### |
| 14 | +# Subschemas |
| 15 | +definitions: |
| 16 | + ami_release: |
| 17 | + # Release metadata for an AMI. |
| 18 | + type: object |
| 19 | + properties: |
| 20 | + product: |
| 21 | + type: string |
| 22 | + minLength: 1 |
| 23 | + version: |
| 24 | + $ref: "#/definitions/optional_string" |
| 25 | + base_product: |
| 26 | + $ref: "#/definitions/optional_string" |
| 27 | + base_version: |
| 28 | + $ref: "#/definitions/optional_string" |
| 29 | + variant: |
| 30 | + $ref: "#/definitions/optional_string" |
| 31 | + arch: |
| 32 | + type: string |
| 33 | + enum: |
| 34 | + - arm64 |
| 35 | + - x86_64 |
| 36 | + respin: |
| 37 | + type: integer |
| 38 | + type: |
| 39 | + $ref: "#/definitions/optional_string" |
| 40 | + enum: ['ga', 'beta', null] |
| 41 | + date: |
| 42 | + type: string |
| 43 | + minLength: 1 |
| 44 | + pattern: "^[0-9]{8}$" |
| 45 | + required: |
| 46 | + - product |
| 47 | + - date |
| 48 | + - arch |
| 49 | + - respin |
| 50 | + |
| 51 | + optional_string: |
| 52 | + # A field which may hold a non-empty string, or null. |
| 53 | + type: |
| 54 | + - string |
| 55 | + - "null" |
| 56 | + minLength: 1 |
| 57 | + |
| 58 | + ami_billing_codes: |
| 59 | + # Billing codes for an AMI |
| 60 | + type: |
| 61 | + - object |
| 62 | + - "null" |
| 63 | + properties: |
| 64 | + name: |
| 65 | + type: string |
| 66 | + codes: |
| 67 | + type: array |
| 68 | + items: |
| 69 | + type: string |
| 70 | + required: |
| 71 | + - name |
| 72 | + - codes |
| 73 | + |
| 74 | + image: |
| 75 | + type: object |
| 76 | + properties: |
| 77 | + path: |
| 78 | + type: string |
| 79 | + architecture: |
| 80 | + type: string |
| 81 | + |
| 82 | +type: object |
| 83 | +properties: |
| 84 | + api: |
| 85 | + type: string |
| 86 | + enum: ["v1"] |
| 87 | + resource: |
| 88 | + type: string |
| 89 | + enum: ["CloudImage"] |
| 90 | + images: |
| 91 | + type: array |
| 92 | + items: |
| 93 | + $ref: "#/definitions/image" |
| 94 | + build: |
| 95 | + type: object |
| 96 | + properties: |
| 97 | + name: string |
| 98 | + version: string |
| 99 | + respin: string |
| 100 | + description: |
| 101 | + type: string |
| 102 | + boot_mode: |
| 103 | + enum: [ 'hybrid', 'uefi', 'legacy', null ] |
| 104 | + type: |
| 105 | + enum: ['AMI', 'VHD', null] |
| 106 | + release: |
| 107 | + $ref: "#/definitions/ami_release" |
| 108 | + |
| 109 | + region: |
| 110 | + # AWS region to which this AMI should be pushed. |
| 111 | + type: string |
| 112 | + minLength: 1 |
| 113 | + |
| 114 | + type: |
| 115 | + # Billing type for the image. |
| 116 | + type: string |
| 117 | + enum: |
| 118 | + - hourly |
| 119 | + - access |
| 120 | + - marketplace |
| 121 | + |
| 122 | + virtualization: |
| 123 | + # Virtualization type. |
| 124 | + type: string |
| 125 | + enum: |
| 126 | + - hvm |
| 127 | + |
| 128 | + volume: |
| 129 | + type: string |
| 130 | + enum: |
| 131 | + - standard |
| 132 | + - gp2 |
| 133 | + - gp3 |
| 134 | + - io1 |
| 135 | + - io2 |
| 136 | + - st1 |
| 137 | + - sc1 |
| 138 | + |
| 139 | + root_device: |
| 140 | + type: string |
| 141 | + minLength: 1 |
| 142 | + |
| 143 | + description: |
| 144 | + $ref: "#/definitions/optional_string" |
| 145 | + |
| 146 | + sriov_net_support: |
| 147 | + type: |
| 148 | + - string |
| 149 | + - "null" |
| 150 | + enum: |
| 151 | + - simple |
| 152 | + - null |
| 153 | + |
| 154 | + ena_support: |
| 155 | + type: |
| 156 | + - boolean |
| 157 | + - "null" |
| 158 | + |
| 159 | + uefi_support: |
| 160 | + type: |
| 161 | + - boolean |
| 162 | + - "null" |
| 163 | + |
| 164 | + billing_codes: |
| 165 | + $ref: "#/definitions/ami_billing_codes" |
| 166 | + |
| 167 | + boot_mode: |
| 168 | + enum: [ 'hybrid', 'uefi', 'legacy', null ] |
| 169 | + |
| 170 | + public_image: |
| 171 | + type: |
| 172 | + - boolean |
| 173 | + - "null" |
| 174 | + release_notes: |
| 175 | + $ref: "#/definitions/optional_string" |
| 176 | + |
| 177 | + usage_instructions: |
| 178 | + $ref: "#/definitions/optional_string" |
| 179 | + |
| 180 | + recommended_instance_type: |
| 181 | + $ref: "#/definitions/optional_string" |
| 182 | + |
| 183 | + marketplace_entity_type: |
| 184 | + $ref: "#/definitions/optional_string" |
| 185 | + |
| 186 | + scanning_port: |
| 187 | + type: |
| 188 | + - number |
| 189 | + - "null" |
| 190 | + minimum: 0 |
| 191 | + maximum: 65536 |
| 192 | + |
| 193 | + user_name: |
| 194 | + $ref: "#/definitions/optional_string" |
| 195 | + version_title: |
| 196 | + $ref: "#/definitions/optional_string" |
| 197 | + marketplace_title_template: |
| 198 | + $ref: "#/definitions/optional_string" |
| 199 | + marketplace_name: |
| 200 | + $ref: "#/definitions/optional_string" |
| 201 | + security_groups: |
| 202 | + type: |
| 203 | + - array |
| 204 | + - "null" |
| 205 | + items: |
| 206 | + type: object |
| 207 | + properties: |
| 208 | + ip_protocol: |
| 209 | + type: string |
| 210 | + ip_ranges: |
| 211 | + type: array |
| 212 | + items: |
| 213 | + type: string |
| 214 | + if: |
| 215 | + properties: |
| 216 | + ip_protocol: |
| 217 | + enum: ["icmp", "icmpv6"] |
| 218 | + then: |
| 219 | + properties: |
| 220 | + from_port: |
| 221 | + type: number |
| 222 | + minimum: -1 |
| 223 | + maximum: 255 |
| 224 | + to_port: |
| 225 | + type: number |
| 226 | + minimum: -1 |
| 227 | + maximum: 255 |
| 228 | + else: |
| 229 | + properties: |
| 230 | + from_port: |
| 231 | + type: number |
| 232 | + minimum: 0 |
| 233 | + maximum: 65536 |
| 234 | + to_port: |
| 235 | + type: number |
| 236 | + minimum: 0 |
| 237 | + maximum: 65536 |
| 238 | + |
| 239 | + access_endpoint_url: |
| 240 | + type: |
| 241 | + - object |
| 242 | + - "null" |
| 243 | + properties: |
| 244 | + port: |
| 245 | + type: number |
| 246 | + minimum: 0 |
| 247 | + maximum: 65536 |
| 248 | + protocol: |
| 249 | + enum: ["http", "https"] |
| 250 | + |
| 251 | +required: |
| 252 | +- api |
| 253 | +- resource |
| 254 | +- images |
| 255 | +- build |
| 256 | +- description |
| 257 | + |
| 258 | +additionalProperties: false |
0 commit comments