Conch API

Logo

Datacenter build and management service

View the Project on GitHub joyent/conch-api

NAME

Conch::DB::Result::Device

BASE CLASS: Conch::DB::Result

TABLE: device

ACCESSORS

id

data_type: 'text'
is_nullable: 0

system_uuid

data_type: 'uuid'
is_nullable: 1
size: 16

hardware_product_id

data_type: 'uuid'
is_foreign_key: 1
is_nullable: 0
size: 16

state

data_type: 'text'
is_nullable: 0

health

data_type: 'enum'
extra: {custom_type_name => "device_health_enum",list => ["error","fail","unknown","pass"]}
is_nullable: 0

graduated

data_type: 'timestamp with time zone'
is_nullable: 1

deactivated

data_type: 'timestamp with time zone'
is_nullable: 1

last_seen

data_type: 'timestamp with time zone'
is_nullable: 1

created

data_type: 'timestamp with time zone'
default_value: current_timestamp
is_nullable: 0
original: {default_value => \"now()"}

updated

data_type: 'timestamp with time zone'
default_value: current_timestamp
is_nullable: 0
original: {default_value => \"now()"}

uptime_since

data_type: 'timestamp with time zone'
is_nullable: 1

validated

data_type: 'timestamp with time zone'
is_nullable: 1

latest_triton_reboot

data_type: 'timestamp with time zone'
is_nullable: 1

triton_uuid

data_type: 'uuid'
is_nullable: 1
size: 16

asset_tag

data_type: 'text'
is_nullable: 1

triton_setup

data_type: 'timestamp with time zone'
is_nullable: 1

hostname

data_type: 'text'
is_nullable: 1

phase

data_type: 'enum'
default_value: 'integration'
extra: {custom_type_name => "device_phase_enum",list => ["integration","installation","production","diagnostics","decommissioned"]}
is_nullable: 0

PRIMARY KEY

UNIQUE CONSTRAINTS

device_system_uuid_key

RELATIONS

device_disks

Type: has_many

Related object: Conch::DB::Result::DeviceDisk

device_environment

Type: might_have

Related object: Conch::DB::Result::DeviceEnvironment

device_location

Type: might_have

Related object: Conch::DB::Result::DeviceLocation

device_nics

Type: has_many

Related object: Conch::DB::Result::DeviceNic

device_relay_connections

Type: has_many

Related object: Conch::DB::Result::DeviceRelayConnection

device_reports

Type: has_many

Related object: Conch::DB::Result::DeviceReport

device_settings

Type: has_many

Related object: Conch::DB::Result::DeviceSetting

hardware_product

Type: belongs_to

Related object: Conch::DB::Result::HardwareProduct

validation_results

Type: has_many

Related object: Conch::DB::Result::ValidationResult

validation_states

Type: has_many

Related object: Conch::DB::Result::ValidationState

relays

Type: many_to_many

Composing rels: “device_relay_connections” -> relay

latest_report_data

Returns the JSON-decoded content from the most recent device report.

device_settings_as_hash

Returns a hash of all (active) device settings.

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/.