Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
Created using spr 1.3.4
  • Loading branch information
sunshowers committed Oct 12, 2023
2 parents d8312dd + 39407fc commit 9ce8012
Show file tree
Hide file tree
Showing 123 changed files with 5,518 additions and 3,566 deletions.
1 change: 1 addition & 0 deletions .github/buildomat/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ org_only = true
allow_users = [
"dependabot[bot]",
"oxide-reflector-bot[bot]",
"oxide-renovate[bot]",
"renovate[bot]",
]
17 changes: 0 additions & 17 deletions .github/dependabot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/check-opte-ver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
check-opte-ver:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Install jq
run: sudo apt-get install -y jq
- name: Install toml-cli
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-workspace-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
check-workspace-deps:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Check Workspace Dependencies
run: cargo xtask check-workspace-deps
10 changes: 5 additions & 5 deletions .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ jobs:
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@v2
uses: taiki-e/install-action@e659bf85ee986e37e35cc1c53bfeebe044d8133e # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
uses: actions-rs/cargo@v1
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
with:
command: hakari
args: generate --diff
- name: Check all crates depend on workspace-hack
uses: actions-rs/cargo@v1
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
with:
command: hakari
args: manage-deps --dry-run
14 changes: 7 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
check-style:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- name: Report cargo version
run: cargo --version
- name: Report rustfmt version
Expand All @@ -27,8 +27,8 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/[email protected]
- uses: Swatinem/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
Expand All @@ -53,8 +53,8 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/[email protected]
- uses: Swatinem/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
Expand All @@ -79,8 +79,8 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/[email protected]
- uses: Swatinem/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # v2.2.1
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dendrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:

# Checkout both the target and integration branches
- uses: actions/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
token: ${{ inputs.reflector_access_token }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-maghemite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:

# Checkout both the target and integration branches
- uses: actions/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
token: ${{ inputs.reflector_access_token }}
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '18'
- name: Install our tools
Expand Down
45 changes: 33 additions & 12 deletions Cargo.lock

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

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ api_identity = { path = "api_identity" }
approx = "0.5.1"
assert_matches = "1.5.0"
assert_cmd = "2.0.12"
async-bb8-diesel = { git = "https://github.com/oxidecomputer/async-bb8-diesel", rev = "da04c087f835a51e0441addb19c5ef4986e1fcf2" }
async-bb8-diesel = { git = "https://github.com/oxidecomputer/async-bb8-diesel", rev = "1446f7e0c1f05f33a0581abd51fa873c7652ab61" }
async-trait = "0.1.73"
atomicwrites = "0.4.1"
authz-macros = { path = "nexus/authz-macros" }
Expand Down Expand Up @@ -199,6 +199,7 @@ headers = "0.3.9"
heck = "0.4"
hex = "0.4.3"
hex-literal = "0.4.1"
highway = "1.1.0"
hkdf = "0.12.3"
http = "0.2.9"
httptest = "0.15.4"
Expand Down Expand Up @@ -274,7 +275,7 @@ percent-encoding = "2.2.0"
pem = "1.1"
petgraph = "0.6.4"
postgres-protocol = "0.6.6"
predicates = "3.0.3"
predicates = "3.0.4"
pretty_assertions = "1.4.0"
pretty-hex = "0.3.0"
proc-macro2 = "1.0"
Expand All @@ -283,7 +284,7 @@ progenitor-client = { git = "https://github.com/oxidecomputer/progenitor", branc
bhyve_api = { git = "https://github.com/oxidecomputer/propolis", rev = "901b710b6e5bd05a94a323693c2b971e7e7b240e" }
propolis-client = { git = "https://github.com/oxidecomputer/propolis", rev = "901b710b6e5bd05a94a323693c2b971e7e7b240e", features = [ "generated-migration" ] }
propolis-server = { git = "https://github.com/oxidecomputer/propolis", rev = "901b710b6e5bd05a94a323693c2b971e7e7b240e", default-features = false, features = ["mock-only"] }
proptest = "1.2.0"
proptest = "1.3.1"
quote = "1.0"
rand = "0.8.5"
ratatui = "0.23.0"
Expand Down
43 changes: 27 additions & 16 deletions clients/nexus-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,41 @@ impl From<omicron_common::api::internal::nexus::InstanceRuntimeState>
s: omicron_common::api::internal::nexus::InstanceRuntimeState,
) -> Self {
Self {
run_state: s.run_state.into(),
sled_id: s.sled_id,
propolis_id: s.propolis_id,
dst_propolis_id: s.dst_propolis_id,
propolis_addr: s.propolis_addr.map(|addr| addr.to_string()),
gen: s.gen.into(),
migration_id: s.migration_id,
propolis_gen: s.propolis_gen.into(),
ncpus: s.ncpus.into(),
memory: s.memory.into(),
hostname: s.hostname,
propolis_id: s.propolis_id,
time_updated: s.time_updated,
}
}
}

impl From<omicron_common::api::internal::nexus::VmmRuntimeState>
for types::VmmRuntimeState
{
fn from(s: omicron_common::api::internal::nexus::VmmRuntimeState) -> Self {
Self {
gen: s.gen.into(),
state: s.state.into(),
time_updated: s.time_updated,
}
}
}

impl From<omicron_common::api::internal::nexus::SledInstanceState>
for types::SledInstanceState
{
fn from(
s: omicron_common::api::internal::nexus::SledInstanceState,
) -> Self {
Self {
instance_state: s.instance_state.into(),
propolis_id: s.propolis_id,
vmm_state: s.vmm_state.into(),
}
}
}

impl From<omicron_common::api::external::InstanceState>
for types::InstanceState
{
Expand All @@ -124,14 +143,6 @@ impl From<omicron_common::api::external::InstanceState>
}
}

impl From<omicron_common::api::external::InstanceCpuCount>
for types::InstanceCpuCount
{
fn from(s: omicron_common::api::external::InstanceCpuCount) -> Self {
Self(s.0)
}
}

impl From<omicron_common::api::external::Generation> for types::Generation {
fn from(s: omicron_common::api::external::Generation) -> Self {
Self(i64::from(&s) as u64)
Expand Down
Loading

0 comments on commit 9ce8012

Please sign in to comment.