Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #962 from joyent/ether/v3-b3-misc-fixes
Browse files Browse the repository at this point in the history
v3 b3 misc fixes
  • Loading branch information
karenetheridge authored Dec 9, 2019
2 parents 640e729 + 7fa28e1 commit ad30297
Show file tree
Hide file tree
Showing 118 changed files with 632 additions and 354 deletions.
10 changes: 5 additions & 5 deletions docs/json-schema/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"additionalProperties" : false,
"properties" : {
"alias" : {
"$ref" : "common.json#/definitions/non_empty_string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"az" : {
"$ref" : "common.json#/definitions/non_empty_string"
Expand All @@ -257,7 +257,7 @@
"minProperties" : 1,
"properties" : {
"alias" : {
"$ref" : "common.json#/definitions/non_empty_string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"az" : {
"$ref" : "common.json#/definitions/non_empty_string"
Expand Down Expand Up @@ -872,7 +872,7 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"$ref" : "common.json#/definitions/non_empty_string"
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
},
"phase" : {
"$ref" : "common.json#/definitions/device_phase"
Expand Down Expand Up @@ -982,7 +982,7 @@
"minProperties" : 1,
"properties" : {
"name" : {
"$ref" : "common.json#/definitions/non_empty_string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"rack_size" : {
"$ref" : "common.json#/definitions/positive_integer"
Expand Down Expand Up @@ -1011,7 +1011,7 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"$ref" : "common.json#/definitions/non_empty_string"
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
},
"phase" : {
"$ref" : "common.json#/definitions/device_phase"
Expand Down
22 changes: 11 additions & 11 deletions docs/json-schema/response.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"started" : {
"oneOf" : [
Expand Down Expand Up @@ -219,7 +219,7 @@
"additionalProperties" : false,
"properties" : {
"alias" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"az" : {
"type" : "string"
Expand Down Expand Up @@ -785,7 +785,7 @@
"rack_name" : {
"oneOf" : [
{
"type" : "string"
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
},
{
"type" : "null"
Expand Down Expand Up @@ -1862,7 +1862,7 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"users" : {
"items" : {
Expand Down Expand Up @@ -2016,7 +2016,7 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
},
"phase" : {
"$ref" : "common.json#/definitions/device_phase"
Expand Down Expand Up @@ -2158,7 +2158,7 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"rack_size" : {
"$ref" : "common.json#/definitions/positive_integer"
Expand Down Expand Up @@ -2415,7 +2415,7 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"role" : {
"$ref" : "common.json#/definitions/role"
Expand Down Expand Up @@ -3146,13 +3146,13 @@
"$ref" : "common.json#/definitions/uuid"
},
"name" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
},
"phase" : {
"$ref" : "common.json#/definitions/device_phase"
},
"rack_role_name" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"rack_size" : {
"$ref" : "common.json#/definitions/positive_integer"
Expand Down Expand Up @@ -3213,10 +3213,10 @@
"$ref" : "common.json#/definitions/uuid"
},
"rack_name" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_relaxed_placeholder"
},
"rack_role_name" : {
"type" : "string"
"$ref" : "common.json#/definitions/mojo_standard_placeholder"
},
"rack_unit_start" : {
"$ref" : "common.json#/definitions/positive_integer"
Expand Down
8 changes: 8 additions & 0 deletions docs/modules/Conch::Command::fix_usernames.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ bin/conch fix_usernames [long options...]
--help print usage message and exit
```

# LICENSING

Copyright Joyent, Inc.

This Source Code Form is subject to the terms of the Mozilla Public License,
v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/).
8 changes: 8 additions & 0 deletions docs/modules/Conch::Command::force_password_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ bin/conch force_password_change [long options...]
--help print usage message and exit
```

# LICENSING

Copyright Joyent, Inc.

This Source Code Form is subject to the terms of the Mozilla Public License,
v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/).
8 changes: 8 additions & 0 deletions docs/modules/Conch::Command::workspace_to_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ bin/conch workspace_to_build [long options...] <workspace name> [workspace name]
--help print usage message and exit
```

# LICENSING

Copyright Joyent, Inc.

This Source Code Form is subject to the terms of the Mozilla Public License,
v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at [http://mozilla.org/MPL/2.0/](http://mozilla.org/MPL/2.0/).
6 changes: 3 additions & 3 deletions docs/modules/Conch::Controller::Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Requires the user to be a system admin.

## find\_build

Chainable action that validates the `build_id` or `build_name` provided in the
path, and stashes the query to get to it in `build_rs`.
Chainable action that uses the `build_id_or_name` value provided in the stash (usually via the
request URL) to look up a build, and stashes the query to get to it in `build_rs`.

If `require_role` is provided, it is used as the minimum required role for the user to
continue; otherwise the user must be a system admin.
continue; otherwise the user must have the 'admin' role.

## get

Expand Down
3 changes: 2 additions & 1 deletion docs/modules/Conch::Controller::Datacenter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Conch::Controller::Datacenter

## find\_datacenter

Handles looking up the object by id.
Chainable action that uses the `datacenter_id` value provided in the stash (usually via the
request URL) to look up a datacenter, and stashes the result in `datacenter`.

## get\_all

Expand Down
4 changes: 3 additions & 1 deletion docs/modules/Conch::Controller::DatacenterRoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Conch::Controller::DatacenterRoom

## find\_datacenter\_room

Handles looking up the object by id or alias.
Chainable action that uses the `datacenter_room_id_or_alias` value provided in the stash
(usually via the request URL) to look up a datacenter\_room, and stashes the result in
`datacenter_room`.

## get\_all

Expand Down
7 changes: 4 additions & 3 deletions docs/modules/Conch::Controller::Device.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ Conch::Controller::Device

## find\_device

Chainable action that uses the `device_id_or_serial_number` provided in the path
to find the device and verify the user has the required role to operate on it.
Chainable action that uses the `device_id`, `device_serial_number` or
`device_id_or_serial_number` provided in the stash (usually via the request URL) to look up a
device, and stashes the query to get to it in `device_rs`.

If `require_role` is provided, it is used as the minimum required role for the user to
continue.
continue; otherwise the user must be a registered relay user or a system admin.

If `phase_earlier_than` is provided, `409 CONFLICT` is returned if the device is in the
provided phase (or later).
Expand Down
4 changes: 3 additions & 1 deletion docs/modules/Conch::Controller::DeviceInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Conch::Controller::Device

## find\_device\_interface

Chainable action that looks up the device interface by its id or name.
Chainable action that uses the `interface_name` value provided in the stash (usually via the
request URL) to look up a device interface, and stashes the query to get to it in
`device_interface_rs`.

## get\_one\_field

Expand Down
7 changes: 5 additions & 2 deletions docs/modules/Conch::Controller::DeviceReport.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ Uses a device report to populate configuration information about the given devic

## find\_device\_report

Chainable action that validates the 'device\_report\_id' provided in the path.
Stores the device\_id and device\_report resultset to the stash for later retrieval.
Chainable action that uses the `device_report_id` value provided in the stash (usually via the
request URL) to look up a device report, and stashes the query to get to it in
`device_report_rs`.

`device_id` is also saved to the stash.

Role checks are done in the next controller action in the chain.

Expand Down
7 changes: 5 additions & 2 deletions docs/modules/Conch::Controller::HardwareProduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ Response uses the HardwareProducts json schema.

## find\_hardware\_product

Chainable action that looks up the object by id, sku, name or alias depending on the url
pattern, stashing the query to get to it in `hardware_product_rs`.
Chainable action that uses the `hardware_product_id` or `hardware_product_key` and
`hardware_product_value` values provided in the stash (usually via the request URL) to look up
a hardware\_product, and stashes the query to get to it in `hardware_product_rs`.

Supported keys are: `sku`, `name`, and `alias`.

## get

Expand Down
5 changes: 3 additions & 2 deletions docs/modules/Conch::Controller::HardwareVendor.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# NAME

Conch::Controller::User
Conch::Controller::HardwareVendor

# METHODS

## find\_hardware\_vendor

Handles looking up the object by id or name.
Chainable action that uses the `hardware_vendor_id_or_name` value provided in the stash
(usually via the request URL) to look up a build, and stashes the result in `hardware_vendor`.

## get\_all

Expand Down
8 changes: 5 additions & 3 deletions docs/modules/Conch::Controller::Organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ Requires the user to be a system admin.

## find\_organization

Chainable action that validates the `organization_id` or `organization_name` provided in the
path, and stashes the query to get to it in `organization_rs`.
Chainable action that uses the `organization_id_or_name` value provided in the stash (usually
via the request URL) to look up a build, and stashes the query to get to it in
`organization_rs`.

Requires the 'admin' role on the organization (or the user to be a system admin).
If `require_role` is provided, it is used as the minimum required role for the user to
continue; otherwise the user must have the 'admin' role.

## get

Expand Down
10 changes: 7 additions & 3 deletions docs/modules/Conch::Controller::Rack.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ Conch::Controller::Rack

## find\_rack

Supports rack lookups by uuid.
Chainable action that uses the `rack_id` value provided in the stash (usually via the
request URL) to look up a rack, and stashes the query to get to it in `rack_rs`.

If `require_role` is provided, it is used as the minimum required role for the user to
continue; otherwise the user must be a system admin.

## create

Expand Down Expand Up @@ -55,8 +59,8 @@ Assigns devices to rack layouts, also optionally updating serial\_numbers and as
creating the device if needed). Existing devices in referenced slots will be unassigned as needed.

Note: the assignment is still performed even if there is no physical room in the rack
for the new hardware (its rack\_unit\_size overlaps into a subsequent layout), or that
the device's hardware matches what the layout specifies.
for the new hardware (its rack\_unit\_size overlaps into a subsequent layout), or if the device's
hardware doesn't match what the layout specifies.

## delete\_assignment

Expand Down
3 changes: 2 additions & 1 deletion docs/modules/Conch::Controller::RackLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Conch::Controller::RackLayout

## find\_rack\_layout

Supports rack layout lookups by id.
Chainable action that uses the `layout_id` value provided in the stash (usually via the
request URL) to look up a build, and stashes the query to get to it in `layout_rs`.

## create

Expand Down
3 changes: 2 additions & 1 deletion docs/modules/Conch::Controller::RackRole.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Conch::Controller::RackRole

## find\_rack\_role

Supports rack role lookups by uuid and name.
Chainable action that uses the `rack_role_id_or_name` value provided in the stash (usually via
the request URL) to look up a build, and stashes the result in `rack_role`.

## create

Expand Down
7 changes: 5 additions & 2 deletions docs/modules/Conch::Controller::Relay.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ Response uses the Relays json schema.

## find\_relay

Chainable action that looks up the relay by id or serial\_number,
stashing the query to get to it in `relay_rs`.
Chainable action that uses the `relay_id_or_serial_number` provided in the stash (usually
via the request URL), and stashes the query to get to it in `relay_rs`.

The relay must have been registered by the user to continue; otherwise the user must be a
system admin.

## get

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/Conch::Controller::User.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Conch::Controller::User

## find\_user

Chainable action that validates the `target_user_id_or_email` provided in the path, and
stashes the corresponding user row in `target_user`.
Chainable action that uses the `target_user_id_or_email` value provided in the stash (usually
via the request URL) to look up a user, and stashes the result in `target_user`.

## revoke\_user\_tokens

Expand Down
3 changes: 2 additions & 1 deletion docs/modules/Conch::Controller::Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Response uses the Validations json schema (including deactivated ones).

## find\_validation

Find the Validation specified by uuid or name, and stashes the query to get to it in
Chainable action that uses the `validation_id_or_name` value provided in the stash (usually
via the request URL) to look up a validation, and stashes the query to get to it in
`validation_rs`.

## get
Expand Down
3 changes: 2 additions & 1 deletion docs/modules/Conch::Controller::ValidationPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Response uses the ValidationPlans json schema.

## find\_validation\_plan

Find the Validation Plan specified by uuid or name and put it in the stash as
Chainable action that uses the `validation_plan_id_or_name` provided in the stash
(usually via the request URL) to look up a validation\_plan, and stashes the result in
`validation_plan`.

## get
Expand Down
Loading

0 comments on commit ad30297

Please sign in to comment.