device

package
v0.6.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type DeviceSnapshot

type DeviceSnapshot struct {
	// 'id' is the unique snapshot identifier
	ID ID `protobuf:"bytes,1,opt,name=id,proto3,casttype=ID" json:"id,omitempty"`
	// 'device_id' is the device to which the snapshot applies
	DeviceID github_com_onosproject_onos_config_api_types_device.ID `` /* 149-byte string literal not displayed */
	// 'device_version' is the version to which the snapshot applies
	DeviceVersion github_com_onosproject_onos_config_api_types_device.Version `` /* 169-byte string literal not displayed */
	// 'device_type' is an optional device type to which to apply this change
	DeviceType github_com_onosproject_onos_config_api_types_device.Type `` /* 157-byte string literal not displayed */
	// 'revision' is the request revision number
	Revision Revision `protobuf:"varint,5,opt,name=revision,proto3,casttype=Revision" json:"revision,omitempty"`
	// 'network_snapshot' is a reference to the network snapshot from which this snapshot was created
	NetworkSnapshot NetworkSnapshotRef `protobuf:"bytes,6,opt,name=network_snapshot,json=networkSnapshot,proto3" json:"network_snapshot"`
	// 'max_network_change_index' is the maximum network change index to be snapshotted for the device
	MaxNetworkChangeIndex github_com_onosproject_onos_config_api_types.Index `` /* 189-byte string literal not displayed */
	// 'status' is the snapshot status
	Status snapshot.Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status"`
	// 'created' is the time at which the configuration was created
	Created time.Time `protobuf:"bytes,9,opt,name=created,proto3,stdtime" json:"created"`
	// 'updated' is the time at which the configuration was last updated
	Updated time.Time `protobuf:"bytes,10,opt,name=updated,proto3,stdtime" json:"updated"`
}

DeviceSnapshot is a device snapshot

func (*DeviceSnapshot) Descriptor

func (*DeviceSnapshot) Descriptor() ([]byte, []int)

func (*DeviceSnapshot) GetCreated

func (m *DeviceSnapshot) GetCreated() time.Time

func (*DeviceSnapshot) GetID

func (m *DeviceSnapshot) GetID() ID

func (*DeviceSnapshot) GetMaxNetworkChangeIndex

func (*DeviceSnapshot) GetNetworkSnapshot

func (m *DeviceSnapshot) GetNetworkSnapshot() NetworkSnapshotRef

func (*DeviceSnapshot) GetRevision

func (m *DeviceSnapshot) GetRevision() Revision

func (*DeviceSnapshot) GetStatus

func (m *DeviceSnapshot) GetStatus() snapshot.Status

func (*DeviceSnapshot) GetUpdated

func (m *DeviceSnapshot) GetUpdated() time.Time

func (*DeviceSnapshot) GetVersionedDeviceID

func (s *DeviceSnapshot) GetVersionedDeviceID() device.VersionedID

GetVersionedDeviceID returns the device VersionedID for the snapshot

func (*DeviceSnapshot) Marshal

func (m *DeviceSnapshot) Marshal() (dAtA []byte, err error)

func (*DeviceSnapshot) MarshalTo

func (m *DeviceSnapshot) MarshalTo(dAtA []byte) (int, error)

func (*DeviceSnapshot) MarshalToSizedBuffer

func (m *DeviceSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeviceSnapshot) ProtoMessage

func (*DeviceSnapshot) ProtoMessage()

func (*DeviceSnapshot) Reset

func (m *DeviceSnapshot) Reset()

func (*DeviceSnapshot) Size

func (m *DeviceSnapshot) Size() (n int)

func (*DeviceSnapshot) String

func (m *DeviceSnapshot) String() string

func (*DeviceSnapshot) Unmarshal

func (m *DeviceSnapshot) Unmarshal(dAtA []byte) error

func (*DeviceSnapshot) XXX_DiscardUnknown

func (m *DeviceSnapshot) XXX_DiscardUnknown()

func (*DeviceSnapshot) XXX_Marshal

func (m *DeviceSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeviceSnapshot) XXX_Merge

func (m *DeviceSnapshot) XXX_Merge(src proto.Message)

func (*DeviceSnapshot) XXX_Size

func (m *DeviceSnapshot) XXX_Size() int

func (*DeviceSnapshot) XXX_Unmarshal

func (m *DeviceSnapshot) XXX_Unmarshal(b []byte) error

type ID

type ID types.ID

ID is a snapshot identifier type

func GetSnapshotID

func GetSnapshotID(networkID types.ID, deviceID device.ID, deviceVersion device.Version) ID

GetSnapshotID returns the snapshot ID for the given network snapshot ID and device

func (ID) GetDeviceID

func (i ID) GetDeviceID() device.ID

GetDeviceID returns the device ID for the snapshot ID

func (ID) GetDeviceVersion

func (i ID) GetDeviceVersion() device.Version

GetDeviceVersion returns the device version for the snapshot ID

type NetworkSnapshotRef

type NetworkSnapshotRef struct {
	// 'id' is the identifier of the network snapshot from which this snapshot was created
	ID github_com_onosproject_onos_config_api_types.ID `protobuf:"bytes,1,opt,name=id,proto3,casttype=github.com/onosproject/onos-config/api/types.ID" json:"id,omitempty"`
	// 'index' is the index of the network snapshot from which this snapshot was created
	Index github_com_onosproject_onos_config_api_types.Index `protobuf:"varint,2,opt,name=index,proto3,casttype=github.com/onosproject/onos-config/api/types.Index" json:"index,omitempty"`
}

NetworkSnapshotRef is a back reference to the NetworkSnapshot that created a DeviceSnapshot

func (*NetworkSnapshotRef) Descriptor

func (*NetworkSnapshotRef) Descriptor() ([]byte, []int)

func (*NetworkSnapshotRef) GetID

func (*NetworkSnapshotRef) GetIndex

func (*NetworkSnapshotRef) Marshal

func (m *NetworkSnapshotRef) Marshal() (dAtA []byte, err error)

func (*NetworkSnapshotRef) MarshalTo

func (m *NetworkSnapshotRef) MarshalTo(dAtA []byte) (int, error)

func (*NetworkSnapshotRef) MarshalToSizedBuffer

func (m *NetworkSnapshotRef) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NetworkSnapshotRef) ProtoMessage

func (*NetworkSnapshotRef) ProtoMessage()

func (*NetworkSnapshotRef) Reset

func (m *NetworkSnapshotRef) Reset()

func (*NetworkSnapshotRef) Size

func (m *NetworkSnapshotRef) Size() (n int)

func (*NetworkSnapshotRef) String

func (m *NetworkSnapshotRef) String() string

func (*NetworkSnapshotRef) Unmarshal

func (m *NetworkSnapshotRef) Unmarshal(dAtA []byte) error

func (*NetworkSnapshotRef) XXX_DiscardUnknown

func (m *NetworkSnapshotRef) XXX_DiscardUnknown()

func (*NetworkSnapshotRef) XXX_Marshal

func (m *NetworkSnapshotRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NetworkSnapshotRef) XXX_Merge

func (m *NetworkSnapshotRef) XXX_Merge(src proto.Message)

func (*NetworkSnapshotRef) XXX_Size

func (m *NetworkSnapshotRef) XXX_Size() int

func (*NetworkSnapshotRef) XXX_Unmarshal

func (m *NetworkSnapshotRef) XXX_Unmarshal(b []byte) error

type Revision

type Revision types.Revision

Revision is a device snapshot revision number

type Snapshot

type Snapshot struct {
	// 'id' is a unique snapshot identifier
	ID ID `protobuf:"bytes,1,opt,name=id,proto3,casttype=ID" json:"id,omitempty"`
	// 'device_id' is the device to which the snapshot applies
	DeviceID github_com_onosproject_onos_config_api_types_device.ID `` /* 149-byte string literal not displayed */
	// 'device_version' is the version to which the snapshot applies
	DeviceVersion github_com_onosproject_onos_config_api_types_device.Version `` /* 169-byte string literal not displayed */
	// 'device_type' is an optional device type to which to apply this change
	DeviceType github_com_onosproject_onos_config_api_types_device.Type `` /* 157-byte string literal not displayed */
	// 'snapshot_id' is the ID of the snapshot
	SnapshotID ID `protobuf:"bytes,5,opt,name=snapshot_id,json=snapshotId,proto3,casttype=ID" json:"snapshot_id,omitempty"`
	// 'change_index' is the change index at which the snapshot ended
	ChangeIndex github_com_onosproject_onos_config_api_types_change_device.Index `` /* 169-byte string literal not displayed */
	// 'values' is a list of values to set
	Values []*device.PathValue `protobuf:"bytes,7,rep,name=values,proto3" json:"values,omitempty"`
}

Snapshot is a snapshot of the state of a single device

func (*Snapshot) Descriptor

func (*Snapshot) Descriptor() ([]byte, []int)

func (*Snapshot) GetID

func (m *Snapshot) GetID() ID

func (*Snapshot) GetSnapshotID

func (m *Snapshot) GetSnapshotID() ID

func (*Snapshot) GetValues

func (m *Snapshot) GetValues() []*device.PathValue

func (*Snapshot) GetVersionedDeviceID

func (s *Snapshot) GetVersionedDeviceID() device.VersionedID

GetVersionedDeviceID returns the device VersionedID for the snapshot

func (*Snapshot) Marshal

func (m *Snapshot) Marshal() (dAtA []byte, err error)

func (*Snapshot) MarshalTo

func (m *Snapshot) MarshalTo(dAtA []byte) (int, error)

func (*Snapshot) MarshalToSizedBuffer

func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Snapshot) ProtoMessage

func (*Snapshot) ProtoMessage()

func (*Snapshot) Reset

func (m *Snapshot) Reset()

func (*Snapshot) Size

func (m *Snapshot) Size() (n int)

func (*Snapshot) String

func (m *Snapshot) String() string

func (*Snapshot) Unmarshal

func (m *Snapshot) Unmarshal(dAtA []byte) error

func (*Snapshot) XXX_DiscardUnknown

func (m *Snapshot) XXX_DiscardUnknown()

func (*Snapshot) XXX_Marshal

func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Snapshot) XXX_Merge

func (m *Snapshot) XXX_Merge(src proto.Message)

func (*Snapshot) XXX_Size

func (m *Snapshot) XXX_Size() int

func (*Snapshot) XXX_Unmarshal

func (m *Snapshot) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL