Skip to content

Commit 6414a07

Browse files
MatiasTroypat
authored andcommitted
Moved the swagger/firecracker.yaml definition to the
refactor: move api_server as a module inside firecracke Signed-off-by: Matias Teragni <mteragni@amazon.com>
1 parent 5bc3751 commit 6414a07

File tree

18 files changed

+26
-30
lines changed

18 files changed

+26
-30
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ Firecracker's overall architecture is described in
9292

9393
Firecracker consists of a single micro Virtual Machine Manager process that
9494
exposes an API endpoint to the host once started. The API is
95-
[specified in OpenAPI format](
96-
src/firecracker/src/api_server/swagger/firecracker.yaml
97-
). Read more
95+
[specified in OpenAPI format](src/firecracker/swagger/firecracker.yaml). Read more
9896
about it in the [API docs](docs/api_requests).
9997

10098
The **API endpoint** can be used to:

SPECIFICATION.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ enough RAM, etc.), customers can rely on the following:
1919
they are logged<sup>2</sup> by the Firecracker process.
2020
1. **API Stability:** The API socket is always available and the API conforms
2121
to the in-tree
22-
[Open API specification](
23-
src/firecracker/src/api_server/swagger/firecracker.yaml
24-
). API failures
22+
[Open API specification](src/firecracker/swagger/firecracker.yaml). API failures
2523
are logged in the Firecracker log.
2624
1. **Overhead:** For a Firecracker virtual machine manager running a microVM
2725
with `1 CPUs and 128 MiB of RAM`, and a guest OS with the Firecracker-tuned

docs/api_requests/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Firecracker microVMs can execute actions that can be triggered via `PUT`
44
requests on the `/actions` resource.
55

66
Details about the required fields can be found in the
7-
[swagger definition](../../src/firecracker/src/api_server/swagger/firecracker.yaml).
7+
[swagger definition](../../src/firecracker/swagger/firecracker.yaml).
88

99
## InstanceStart
1010

docs/api_requests/patch-network-interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Accept: application/json
5858
```
5959

6060
The full specification of the data structures available for this call can be
61-
found in our [OpenAPI spec](../../src/firecracker/src/api_server/swagger/firecracker.yaml).
61+
found in our [OpenAPI spec](../../src/firecracker/swagger/firecracker.yaml).
6262

6363
**Note**: The data provided for the update is merged with the existing data.
6464
In the above example, the RX rate limit is updated, but the TX rate limit

docs/device-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ a call to one of the [API Endpoints](#api-endpoints) will fail with a
3434
## Input Schema
3535

3636
All input schema fields can be found in the [Swagger](https://swagger.io)
37-
specification: [firecracker.yaml](./../src/firecracker/src/api_server/swagger/firecracker.yaml).
37+
specification: [firecracker.yaml](./../src/firecracker/swagger/firecracker.yaml).
3838

3939
| Schema | Property | keyboard | serial console | virtio-block | vhost-user-block | virtio-net | virtio-vsock | virtio-rng |
4040
|----------------------------|-----------------------| :------: | :------------: | :----------: | :--------------: | :-----------: | :----------: | :--------: |
@@ -108,7 +108,7 @@ virtio-net, virtio-block and virtio-rng devices.
108108
## Output Schema
109109

110110
All output schema fields can be found in the [Swagger](https://swagger.io)
111-
specification: [firecracker.yaml](./../src/firecracker/src/api_server/swagger/firecracker.yaml).
111+
specification: [firecracker.yaml](./../src/firecracker/swagger/firecracker.yaml).
112112

113113
| Schema | Property | keyboard | serial console | virtio-block | vhost-user-block | virtio-net | virtio-vsock |
114114
| ---------------------- | ----------------- | :------: | :------------: | :----------: | :--------------: | :--------: | :----------: |
@@ -126,7 +126,7 @@ specification: [firecracker.yaml](./../src/firecracker/src/api_server/swagger/fi
126126
## Instance Actions
127127

128128
All instance actions can be found in the [Swagger](https://swagger.io)
129-
specification: [firecracker.yaml](./../src/firecracker/src/api_server/swagger/firecracker.yaml).
129+
specification: [firecracker.yaml](./../src/firecracker/swagger/firecracker.yaml).
130130

131131
| Action | keyboard | serial console | virtio-block | vhost-user-block | virtio-net | virtio-vsock |
132132
| ---------------- | :------: | :------------: | :----------: | :--------------: | :--------: | :----------: |

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ optional. This configuration method will also start the microVM, as such you
277277
need to specify all desired pre-boot configurable resources in the JSON. The
278278
names of the resources can be seen in
279279
[`firecracker.yaml`]
280-
(../src/firecracker/src/api_server/swagger/firecracker.yaml) and the
280+
(../src/firecracker/swagger/firecracker.yaml) and the
281281
names of their fields are the same that are used in the API requests.
282282

283283
An example of configuration file is provided:

docs/logger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ curl --unix-socket /tmp/firecracker.socket -i \
3737
```
3838

3939
Details about the required and optional fields can be found in the
40-
[swagger definition](../src/firecracker/src/api_server/swagger/firecracker.yaml).
40+
[swagger definition](../src/firecracker/swagger/firecracker.yaml).
4141

4242
## Using command line parameters for configuration
4343

docs/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ curl --unix-socket /tmp/firecracker.socket -i \
4343
```
4444

4545
Details about this configuration can be found in the
46-
[swagger definition](../src/firecracker/src/api_server/swagger/firecracker.yaml).
46+
[swagger definition](../src/firecracker/swagger/firecracker.yaml).
4747

4848
The metrics are written to the `metrics_path` in JSON format.
4949

docs/mmds/mmds-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ a reply.
116116

117117
Somewhat confusingly, this is the name of the component which taps the device
118118
model. It has a user-configured IPv4 address (see
119-
[Firecracker MMDS configuration API](../../src/firecracker/src/api_server/swagger/firecracker.yaml))
119+
[Firecracker MMDS configuration API](../../src/firecracker/swagger/firecracker.yaml))
120120
and MAC (`06:01:23:45:67:01`) addresses. The latter is also used to respond to
121121
ARP requests.
122122
For every frame coming from the guest, the following steps take place:

docs/mmds/mmds-user-guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ achieved in two steps:
1414

1515
1. Attach one (or more) network interfaces through an HTTP `PUT` request to
1616
`/network-interfaces/${MMDS_NET_IF}`. The full network configuration API
17-
can be found in the [firecracker swagger file](../../src/firecracker/src/api_server/swagger/firecracker.yaml).
17+
can be found in the [firecracker swagger file](../../src/firecracker/swagger/firecracker.yaml).
1818
1. Configure MMDS through an HTTP `PUT` request to `/mmds/config` resource and
1919
include the IDs of the network interfaces that should allow forwarding requests
2020
to MMDS in the `network_interfaces` list. The complete MMDS API is described in
21-
the [firecracker swagger file](../../src/firecracker/src/api_server/swagger/firecracker.yaml).
21+
the [firecracker swagger file](../../src/firecracker/swagger/firecracker.yaml).
2222

2323
### Examples
2424

@@ -114,7 +114,7 @@ issued. This request must have a payload with metadata structured in
114114
metadata, a subsequent HTTP `PUT` request to the `/mmds` resource must be
115115
issued, using as a payload the new metadata. A complete description of
116116
metadata insertion firecracker API can be found in the
117-
[firecracker swagger file](../../src/firecracker/src/api_server/swagger/firecracker.yaml).
117+
[firecracker swagger file](../../src/firecracker/swagger/firecracker.yaml).
118118

119119
An example of an API request for inserting metadata is provided below:
120120

@@ -149,7 +149,7 @@ To partially update existing metadata, an HTTP `PATCH` request to the `/mmds`
149149
resource has to be issued, using as a payload the metadata patch, as
150150
[JSON Merge Patch](https://tools.ietf.org/html/rfc7396) functionality
151151
describes. A complete description of updating metadata Firecracker API can be
152-
found in the [firecracker swagger file](../../src/firecracker/src/api_server/swagger/firecracker.yaml).
152+
found in the [firecracker swagger file](../../src/firecracker/swagger/firecracker.yaml).
153153

154154
An example API for how to update existing metadata is offered below:
155155

@@ -190,7 +190,7 @@ To retrieve existing MMDS metadata from host operating system, an HTTP `GET`
190190
request to the `/mmds` resource must be issued. The HTTP response returns the
191191
existing metadata, as a JSON formatted text. A complete description of
192192
retrieving metadata Firecracker API can be found in the
193-
[firecracker swagger file](../../src/firecracker/src/api_server/swagger/firecracker.yaml).
193+
[firecracker swagger file](../../src/firecracker/swagger/firecracker.yaml).
194194

195195
Below you can see how to retrieve metadata from the host:
196196

0 commit comments

Comments
 (0)