Skip to content

Commit 5bc3751

Browse files
MatiasTroypat
authored andcommitted
Converted the api_server crate into a module inside firecracker
Moved the api_server crate into a module inside the firecracker crate Updated the imports to code located in api_server to preserve behaviour Signed-off-by: Matias Teragni <mteragni@amazon.com>
1 parent 256e402 commit 5bc3751

37 files changed

+113
-149
lines changed

Cargo.lock

Lines changed: 2 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ 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](src/api_server/swagger/firecracker.yaml). Read more
95+
[specified in OpenAPI format](
96+
src/firecracker/src/api_server/swagger/firecracker.yaml
97+
). Read more
9698
about it in the [API docs](docs/api_requests).
9799

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

SPECIFICATION.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ 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](src/api_server/swagger/firecracker.yaml). API failures
22+
[Open API specification](
23+
src/firecracker/src/api_server/swagger/firecracker.yaml
24+
). API failures
2325
are logged in the Firecracker log.
2426
1. **Overhead:** For a Firecracker virtual machine manager running a microVM
2527
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/api_server/swagger/firecracker.yaml).
7+
[swagger definition](../../src/firecracker/src/api_server/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/api_server/swagger/firecracker.yaml).
61+
found in our [OpenAPI spec](../../src/firecracker/src/api_server/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/api_server/swagger/firecracker.yaml).
37+
specification: [firecracker.yaml](./../src/firecracker/src/api_server/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/api_server/swagger/firecracker.yaml).
111+
specification: [firecracker.yaml](./../src/firecracker/src/api_server/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/api_server/swagger/firecracker.yaml).
126126
## Instance Actions
127127

128128
All instance actions can be found in the [Swagger](https://swagger.io)
129-
specification: [firecracker.yaml](./../src/api_server/swagger/firecracker.yaml).
129+
specification: [firecracker.yaml](./../src/firecracker/src/api_server/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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ configuration for the guest kernel and rootfs, all of the other resources are
276276
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
279-
[`firecracker.yaml`](../src/api_server/swagger/firecracker.yaml) and the
279+
[`firecracker.yaml`]
280+
(../src/firecracker/src/api_server/swagger/firecracker.yaml) and the
280281
names of their fields are the same that are used in the API requests.
281282

282283
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/api_server/swagger/firecracker.yaml).
40+
[swagger definition](../src/firecracker/src/api_server/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/api_server/swagger/firecracker.yaml).
46+
[swagger definition](../src/firecracker/src/api_server/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/api_server/swagger/firecracker.yaml))
119+
[Firecracker MMDS configuration API](../../src/firecracker/src/api_server/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:

0 commit comments

Comments
 (0)