Skip to content

Commit

Permalink
Bump dependencies, progenitor to 3ff2ec1d, oxide.json to omicron:8e26…
Browse files Browse the repository at this point in the history
…331a (#544)

* Rebuilt with latest dependency updates

* Rebuilt with latest dependency updates

* Rebuilt with latest dependency updates

* Rebuilt with latest dependency updates

* Rebuilt with latest dependency updates

* Rebuilt with latest dependency updates

* Rebuilt with latest dependency updates

* update hostname type and ssh-key list operation

---------

Co-authored-by: oxide-reflector-bot[bot] <130185838+oxide-reflector-bot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <[email protected]>
  • Loading branch information
oxide-reflector-bot[bot] and ahl authored Feb 5, 2024
1 parent 2e6f1a6 commit 20203e3
Show file tree
Hide file tree
Showing 7 changed files with 515 additions and 198 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions cli/docs/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,38 @@
}
]
},
{
"name": "ssh-key",
"subcommands": [
{
"name": "list",
"about": "List the SSH public keys added to the instance via cloud-init during instance creation",
"long_about": "Note that this list is a snapshot in time and will not reflect updates made after the instance is created.",
"args": [
{
"long": "instance",
"help": "Name or ID of the instance"
},
{
"long": "limit",
"help": "Maximum number of items returned by a single call"
},
{
"long": "project",
"help": "Name or ID of the project"
},
{
"long": "sort-by",
"values": [
"name_ascending",
"name_descending",
"id_ascending"
]
}
]
}
]
},
{
"name": "start",
"about": "Boot an instance",
Expand Down
4 changes: 2 additions & 2 deletions cli/src/cli_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ fn xxx<'a>(command: CliCommand) -> Option<&'a str> {
CliCommand::InstanceExternalIpList => Some("instance external-ip list"),
CliCommand::InstanceEphemeralIpAttach => Some("instance external-ip attach-ephemeral"),
CliCommand::InstanceEphemeralIpDetach => Some("instance external-ip detach-ephemeral"),
CliCommand::InstanceSshPublicKeyList => Some("instance ssh-key list"),

CliCommand::ProjectList => Some("project list"),
CliCommand::ProjectCreate => Some("project create"),
Expand Down Expand Up @@ -492,8 +493,7 @@ fn xxx<'a>(command: CliCommand) -> Option<&'a str> {
| CliCommand::SiloMetric
| CliCommand::SystemMetric
| CliCommand::UserBuiltinList
| CliCommand::UserBuiltinView
| CliCommand::InstanceSshPublicKeyList => None,
| CliCommand::UserBuiltinView => None,
}
}

Expand Down
4 changes: 2 additions & 2 deletions cli/src/generated_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ impl Cli {
.arg(
clap::Arg::new("hostname")
.long("hostname")
.value_parser(clap::value_parser!(String))
.value_parser(clap::value_parser!(types::Hostname))
.required_unless_present("json-body"),
)
.arg(
Expand Down Expand Up @@ -6685,7 +6685,7 @@ impl<T: CliOverride> Cli<T> {
request = request.body_map(|body| body.description(value.clone()))
}

if let Some(value) = matches.get_one::<String>("hostname") {
if let Some(value) = matches.get_one::<types::Hostname>("hostname") {
request = request.body_map(|body| body.hostname(value.clone()))
}

Expand Down
2 changes: 1 addition & 1 deletion cli/tests/test_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn test_instance_create() {
when.body(&body);
then.created(&oxide::types::Instance {
description: body.description.clone(),
hostname: body.hostname.clone(),
hostname: body.hostname.to_string(),
memory: body.memory.clone(),
name: body.name.clone(),
ncpus: body.ncpus.clone(),
Expand Down
10 changes: 9 additions & 1 deletion oxide.json
Original file line number Diff line number Diff line change
Expand Up @@ -12221,6 +12221,14 @@
"start_time"
]
},
"Hostname": {
"title": "An RFC-1035-compliant hostname",
"description": "A hostname identifies a host on a network, and is usually a dot-delimited sequence of labels, where each label contains only letters, digits, or the hyphen. See RFCs 1035 and 952 for more details.",
"type": "string",
"pattern": "^([a-zA-Z0-9]+[a-zA-Z0-9\\-]*(?<!-))(\\.[a-zA-Z0-9]+[a-zA-Z0-9\\-]*(?<!-))*$",
"minLength": 1,
"maxLength": 253
},
"IdentityProvider": {
"description": "View of an Identity Provider",
"type": "object",
Expand Down Expand Up @@ -12654,7 +12662,7 @@
}
},
"hostname": {
"type": "string"
"$ref": "#/components/schemas/Hostname"
},
"memory": {
"$ref": "#/components/schemas/ByteCount"
Expand Down
Loading

0 comments on commit 20203e3

Please sign in to comment.