Skip to content

Commit efbed33

Browse files
committed
Deploying to gh-pages from @ 1856b84 🚀
1 parent 5baf89a commit efbed33

23 files changed

+879
-158
lines changed

__pycache__/__init__.cpython-39.pyc

0 Bytes
Binary file not shown.

_modules/pushsource/_impl/backend/staged/staged_source.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ <h1>Source code for pushsource._impl.backend.staged.staged_source</h1><div class
4848

4949
<span class="kn">from</span> <span class="nn">.staged_utils</span> <span class="kn">import</span> <span class="n">StagingMetadata</span><span class="p">,</span> <span class="n">StagingLeafDir</span>
5050
<span class="kn">from</span> <span class="nn">.staged_ami</span> <span class="kn">import</span> <span class="n">StagedAmiMixin</span>
51+
<span class="kn">from</span> <span class="nn">.staged_cloud</span> <span class="kn">import</span> <span class="n">StagedCloudMixin</span>
5152
<span class="kn">from</span> <span class="nn">.staged_files</span> <span class="kn">import</span> <span class="n">StagedFilesMixin</span>
5253
<span class="kn">from</span> <span class="nn">.staged_errata</span> <span class="kn">import</span> <span class="n">StagedErrataMixin</span>
5354
<span class="kn">from</span> <span class="nn">.staged_compsxml</span> <span class="kn">import</span> <span class="n">StagedCompsXmlMixin</span>
@@ -67,6 +68,7 @@ <h1>Source code for pushsource._impl.backend.staged.staged_source</h1><div class
6768
<span class="k">class</span> <span class="nc">StagedSource</span><span class="p">(</span>
6869
<span class="n">Source</span><span class="p">,</span>
6970
<span class="n">StagedAmiMixin</span><span class="p">,</span>
71+
<span class="n">StagedCloudMixin</span><span class="p">,</span>
7072
<span class="n">StagedFilesMixin</span><span class="p">,</span>
7173
<span class="n">StagedErrataMixin</span><span class="p">,</span>
7274
<span class="n">StagedCompsXmlMixin</span><span class="p">,</span>
@@ -216,7 +218,11 @@ <h1>Source code for pushsource._impl.backend.staged.staged_source</h1><div class
216218
<span class="p">)</span>
217219
<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">completed_fs</span><span class="p">:</span>
218220
<span class="k">for</span> <span class="n">pushitem</span> <span class="ow">in</span> <span class="n">f</span><span class="o">.</span><span class="n">result</span><span class="p">():</span>
219-
<span class="k">yield</span> <span class="n">pushitem</span></div>
221+
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">pushitem</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
222+
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="n">pushitem</span><span class="p">:</span>
223+
<span class="k">yield</span> <span class="n">p</span>
224+
<span class="k">else</span><span class="p">:</span>
225+
<span class="k">yield</span> <span class="n">pushitem</span></div>
220226

221227

222228

_sources/schema/cloud.rst.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. _cloud_schema:
2+
3+
Schema: cloud
4+
==============
5+
6+
This document shows the schema of cloud build YAML files
7+
supported by this library, in `JSON schema`_ format.
8+
These files may be used within the ``CLOUD_IMAGES`` directory within
9+
a :ref:`staging_structure`.
10+
11+
The latest version of this schema is available in raw form at
12+
https://release-engineering.github.io/pushsource/cloud-schema.yaml.
13+
14+
15+
.. include:: ../../src/pushsource/_impl/schema/cloud-schema.yaml
16+
:code: yaml
17+
18+
19+
.. _JSON schema: https://json-schema.org/

_sources/sources/staged.rst.txt

+16
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Here is a brief overview of the structure of a staging directory:
5555
root/destination/MODULEMD/*
5656
root/destination/RPMS/*.rpm
5757
root/destination/AWS_IMAGES/*
58+
root/destination/CLOUD_IMAGES/*
5859
root/destination/RAW/*
5960

6061
The staging directory consists of:
@@ -196,6 +197,21 @@ Files in this directory must have metadata included in ``staged.yaml``.
196197

197198
Will yield instances of :class:`~pushsource.AmiPushItem`.
198199

200+
root/destination/CLOUD_IMAGES/\*
201+
................................
202+
203+
Each directory within ``CLOUD_IMAGES`` should contain one or more VMI(s) plus a
204+
``resources.yaml`` .
205+
206+
The ``resources.yaml`` contains all the information needed for the
207+
images in that folder.
208+
209+
:ref:`cloud_schema` provides a complete reference of the fields which can be set by this
210+
file.
211+
212+
Will yield instances of either :class:`~pushsource.AmiPushItem` or
213+
:class:`~pushsource.VHDPushItem`.
214+
199215
root/destination/RAW/\*
200216
.......................
201217

cloud-schema.yaml

+258
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
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

Comments
 (0)