lexicons and xrpc
lexicon
com.fedfork.exec.ops.getVm
A bidder answers one of its VMs by name: its ComputeVM (as listVms) and its FirecrackerVM (status phase, lostReason, image sha256 and fetched); each null when absent. Read only (GET). Served only when the host has an ops read secret configured (else 404); requires it as Authorization: Bearer.
definitions: #vm #vmStatus #vmSpec #vmShape #vmRequester #vmContract #vmReceipt #meta #firecrackerVm #firecrackerVmStatus #image
parameters
| parameter | type | description |
|---|---|---|
name * | string | A ComputeVM name (a DNS label). maxLength 63 |
output
| field | type | description |
|---|---|---|
computeVm * | #vm nullable | |
firecrackerVm * | #firecrackerVm nullable |
errors
| error | description |
|---|---|
AuthenticationRequired | 401: the ops read secret is missing or wrong. |
InvalidRequest | 400: name is not a ComputeVM name (a DNS label of at most 63 characters). |
Unavailable | 503: the bidder's objects are not readable yet. |
ReadFailed | 502: the read failed; the host's log has the detail. |
#vm object
#vmStatus object
| field | type | description |
|---|---|---|
phase | string | |
lostReason | string |
#vmSpec object
| field | type | description |
|---|---|---|
vm * | #vmShape | |
requester * | #vmRequester | |
contract | #vmContract |
#vmShape object
| field | type | description |
|---|---|---|
cpus * | integer |
#vmRequester object
| field | type | description |
|---|---|---|
did * | string did |
#vmContract object
| field | type | description |
|---|---|---|
receipt * | #vmReceipt |
#vmReceipt object
| field | type | description |
|---|---|---|
uri * | string at-uri |
#meta object
| field | type | description |
|---|---|---|
name * | string | |
deletionTimestamp | string datetime |
#firecrackerVm object
| field | type | description |
|---|---|---|
metadata * | #meta | |
status * | #firecrackerVmStatus |
#firecrackerVmStatus object
| field | type | description |
|---|---|---|
phase | string | |
lostReason | string | |
image | #image |
#image object
| field | type | description |
|---|---|---|
sha256 | string | |
fetched | boolean |
used in
no page of these docs names it yet.
raw schema: lexicons/com/fedfork/exec/ops/getVm.json
{
"lexicon": 1,
"id": "com.fedfork.exec.ops.getVm",
"defs": {
"main": {
"type": "query",
"description": "A bidder answers one of its VMs by name: its ComputeVM (as listVms) and its FirecrackerVM (status phase, lostReason, image sha256 and fetched); each null when absent. Read only (GET). Served only when the host has an ops read secret configured (else 404); requires it as Authorization: Bearer.",
"parameters": {
"type": "params",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 63,
"description": "A ComputeVM name (a DNS label)."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": [
"computeVm",
"firecrackerVm"
],
"nullable": [
"computeVm",
"firecrackerVm"
],
"properties": {
"computeVm": {
"type": "ref",
"ref": "#vm"
},
"firecrackerVm": {
"type": "ref",
"ref": "#firecrackerVm"
}
}
}
},
"errors": [
{
"name": "AuthenticationRequired",
"description": "401: the ops read secret is missing or wrong."
},
{
"name": "InvalidRequest",
"description": "400: name is not a ComputeVM name (a DNS label of at most 63 characters)."
},
{
"name": "Unavailable",
"description": "503: the bidder's objects are not readable yet."
},
{
"name": "ReadFailed",
"description": "502: the read failed; the host's log has the detail."
}
]
},
"vm": {
"type": "object",
"required": [
"metadata",
"spec",
"status"
],
"properties": {
"metadata": {
"type": "ref",
"ref": "#meta"
},
"spec": {
"type": "ref",
"ref": "#vmSpec"
},
"status": {
"type": "ref",
"ref": "#vmStatus"
}
}
},
"vmStatus": {
"type": "object",
"properties": {
"phase": {
"type": "string"
},
"lostReason": {
"type": "string"
}
}
},
"vmSpec": {
"type": "object",
"required": [
"vm",
"requester"
],
"properties": {
"vm": {
"type": "ref",
"ref": "#vmShape"
},
"requester": {
"type": "ref",
"ref": "#vmRequester"
},
"contract": {
"type": "ref",
"ref": "#vmContract"
}
}
},
"vmShape": {
"type": "object",
"required": [
"cpus"
],
"properties": {
"cpus": {
"type": "integer"
}
}
},
"vmRequester": {
"type": "object",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
},
"vmContract": {
"type": "object",
"required": [
"receipt"
],
"properties": {
"receipt": {
"type": "ref",
"ref": "#vmReceipt"
}
}
},
"vmReceipt": {
"type": "object",
"required": [
"uri"
],
"properties": {
"uri": {
"type": "string",
"format": "at-uri"
}
}
},
"meta": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"deletionTimestamp": {
"type": "string",
"format": "datetime"
}
}
},
"firecrackerVm": {
"type": "object",
"required": [
"metadata",
"status"
],
"properties": {
"metadata": {
"type": "ref",
"ref": "#meta"
},
"status": {
"type": "ref",
"ref": "#firecrackerVmStatus"
}
}
},
"firecrackerVmStatus": {
"type": "object",
"properties": {
"phase": {
"type": "string"
},
"lostReason": {
"type": "string"
},
"image": {
"type": "ref",
"ref": "#image"
}
}
},
"image": {
"type": "object",
"properties": {
"sha256": {
"type": "string"
},
"fetched": {
"type": "boolean"
}
}
}
}
}