cisco_config_copy_mib

package
v0.0.0-...-fac1166 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

This MIB facilitates writing of configuration files of an SNMP Agent running Cisco's IOS in the following ways: to and from the net, copying running configurations to startup configurations and vice-versa, and copying a configuration (running or startup) to and from the local IOS file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CISCOCONFIGCOPYMIB

type CISCOCONFIGCOPYMIB struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// A table of config-copy requests.
	CcCopyTable CISCOCONFIGCOPYMIB_CcCopyTable

	// A table containing information about the failure cause of the config copy
	// operation. An entry is created only when the value of ccCopyState changes
	// to 'failed' for a config copy operation.  Not all combinations of
	// ccCopySourceFileType and ccCopyDestFileType need to be supported.  For
	// example, an implementation may choose to support only the following
	// combination: ccCopySourceFileType = 'runningConfig' ccCopyDestFileType =
	// 'fabricStartupConfig'.   In the case where a fabric wide config copy
	// operation is being performed, for example by selecting ccCopyDestFileType
	// value to be 'fabricStartupConfig', it is possible that the fabric could
	// have more than one device. In such cases this table would have one entry
	// for each device in the fabric. In this case even if the  operation
	// succeeded in one device and failed in  another, the operation as such has
	// failed, so the global state  represented by ccCopyState 'failed', but for
	// the device on which it was success,  ccCopyErrorDescription would have the
	// distinguished value, 'success'.   Once the config copy operation completes
	// and if an entry gets instantiated, the management station  should retrieve
	// the values of the status objects of  interest. Once an entry in ccCopyTable
	// is deleted by management station, all the corresponding entries with the
	// same ccCopyIndex in this table are also  deleted.   In order to prevent old
	// entries from clogging the  table, entries age out at the same time as the
	// corresponding entry with same ccCopyIndex in  ccCopyTable ages out.
	CcCopyErrorTable CISCOCONFIGCOPYMIB_CcCopyErrorTable
}

CISCOCONFIGCOPYMIB

func (*CISCOCONFIGCOPYMIB) GetEntityData

func (cISCOCONFIGCOPYMIB *CISCOCONFIGCOPYMIB) GetEntityData() *types.CommonEntityData

type CISCOCONFIGCOPYMIB_CcCopyErrorTable

type CISCOCONFIGCOPYMIB_CcCopyErrorTable struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// An entry containing information about the outcome at one destination of a
	// failed config copy operation. The type is slice of
	// CISCOCONFIGCOPYMIB_CcCopyErrorTable_CcCopyErrorEntry.
	CcCopyErrorEntry []*CISCOCONFIGCOPYMIB_CcCopyErrorTable_CcCopyErrorEntry
}

CISCOCONFIGCOPYMIB_CcCopyErrorTable A table containing information about the failure cause of the config copy operation. An entry is created only when the value of ccCopyState changes to 'failed' for a config copy operation.

Not all combinations of ccCopySourceFileType and ccCopyDestFileType need to be supported. For example, an implementation may choose to support only the following combination: ccCopySourceFileType = 'runningConfig' ccCopyDestFileType = 'fabricStartupConfig'.

In the case where a fabric wide config copy operation is being performed, for example by selecting ccCopyDestFileType value to be 'fabricStartupConfig', it is possible that the fabric could have more than one device. In such cases this table would have one entry for each device in the fabric. In this case even if the operation succeeded in one device and failed in another, the operation as such has failed, so the global state represented by ccCopyState 'failed', but for the device on which it was success, ccCopyErrorDescription would have the distinguished value, 'success'.

Once the config copy operation completes and if an entry gets instantiated, the management station should retrieve the values of the status objects of interest. Once an entry in ccCopyTable is deleted by management station, all the corresponding entries with the same ccCopyIndex in this table are also deleted.

In order to prevent old entries from clogging the table, entries age out at the same time as the corresponding entry with same ccCopyIndex in ccCopyTable ages out.

func (*CISCOCONFIGCOPYMIB_CcCopyErrorTable) GetEntityData

func (ccCopyErrorTable *CISCOCONFIGCOPYMIB_CcCopyErrorTable) GetEntityData() *types.CommonEntityData

type CISCOCONFIGCOPYMIB_CcCopyErrorTable_CcCopyErrorEntry

type CISCOCONFIGCOPYMIB_CcCopyErrorTable_CcCopyErrorEntry struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// This attribute is a key. The type is string with range: 1..2147483647.
	// Refers to
	// cisco_config_copy_mib.CISCOCONFIGCOPYMIB_CcCopyTable_CcCopyEntry_CcCopyIndex
	CcCopyIndex interface{}

	// This attribute is a key. A monotonically increasing integer for the sole
	// purpose of indexing entries in this table. When a config copy operation has
	// multiple  destinations, then this index value is used to  distinguish
	// between those multiple destinations. The type is interface{} with range:
	// 0..4294967295.
	CcCopyErrorIndex interface{}

	// The type of Internet address for this destination device on which config
	// copy operation is performed. The type is InetAddressType.
	CcCopyErrorDeviceIpAddressType interface{}

	// The IP address of this destination device on which config copy operation is
	// performed. The object value has to be consistent with the type specified in
	// ccCopyErrorDeviceIpAddressType. The type is string with length: 0..255.
	CcCopyErrorDeviceIpAddress interface{}

	// The World Wide Name (WWN) of this destination device on which config copy
	// operation is performed. The value of this object is zero-length string if
	// WWN is unassigned or unknown. For example, devices  which do not support
	// fibre channel would not have WWN. The type is string with length: 0..0 |
	// 8..8 | 16..16.
	CcCopyErrorDeviceWWN interface{}

	// The error description for the error happened for this destination of this
	// config copy  operation. The type is string.
	CcCopyErrorDescription interface{}
}

CISCOCONFIGCOPYMIB_CcCopyErrorTable_CcCopyErrorEntry An entry containing information about the outcome at one destination of a failed config copy operation.

func (*CISCOCONFIGCOPYMIB_CcCopyErrorTable_CcCopyErrorEntry) GetEntityData

type CISCOCONFIGCOPYMIB_CcCopyTable

type CISCOCONFIGCOPYMIB_CcCopyTable struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter

	// A config-copy request.  A management station wishing to create an entry
	// should first generate a random serial number to be used as the index to
	// this sparse table. The station  should then create the associated instance
	// of the row status and row index objects.  It must also,  either in the same
	// or in successive PDUs, create an instance of ccCopySourceFileType and
	// ccCopyDestFileType.  At least one of the file types defined in
	// ConfigFileType TC must be an agent-config file type (i.e. 'startupConfig'
	// or 'runningConfig'). If one of the file types is a 'networkFile', a valid
	// ccCopyFileName and ccCopyServerAddressType and  ccCopyServerAddressRev1 or
	// just ccCopyServerAddress must be created as well. If ccCopyServerAddress is
	// created then ccCopyServerAddressRev1 will store the same IP address and
	// ccCopyServerAddressType will  take the value 'ipv4'.  For a file type of
	// 'iosFile', only a valid ccCopyFileName needs to be created as an  extra
	// parameter.  It should also modify the default values for the  other
	// configuration objects if the defaults are not appropriate.  Once the
	// appropriate instance of all the  configuration objects have been created,
	// either by an explicit SNMP set request or by default, the row  status
	// should be set to active to initiate the  request. Note that this entire
	// procedure may be  initiated via a single set request which specifies a row
	// status of createAndGo as well as specifies valid values for the
	// non-defaulted  configuration objects.  Once the config-copy request has
	// been created  (i.e. the ccCopyEntryRowStatus has been made  active), the
	// entry cannot be modified - the only  operation possible after this is to
	// delete the row.  Once the request completes, the management station  should
	// retrieve the values of the status objects of  interest, and should then
	// delete the entry.  In order to prevent old entries from clogging the
	// table, entries will be aged out, but an entry will  ever be deleted within
	// 5 minutes of completing. The type is slice of
	// CISCOCONFIGCOPYMIB_CcCopyTable_CcCopyEntry.
	CcCopyEntry []*CISCOCONFIGCOPYMIB_CcCopyTable_CcCopyEntry
}

CISCOCONFIGCOPYMIB_CcCopyTable A table of config-copy requests.

func (*CISCOCONFIGCOPYMIB_CcCopyTable) GetEntityData

func (ccCopyTable *CISCOCONFIGCOPYMIB_CcCopyTable) GetEntityData() *types.CommonEntityData

type CISCOCONFIGCOPYMIB_CcCopyTable_CcCopyEntry

type CISCOCONFIGCOPYMIB_CcCopyTable_CcCopyEntry struct {
	EntityData types.CommonEntityData
	YFilter    yfilter.YFilter
	YListKey   string

	// This attribute is a key. Object which specifies a unique entry in the
	// ccCopyTable.  A management station wishing to initiate a config-copy
	// operation should use a random value for this object when creating or
	// modifying an instance of a ccCopyEntry. The RowStatus semantics of the
	// ccCopyEntryRowStatus object will prevent access conflicts. The type is
	// interface{} with range: 1..2147483647.
	CcCopyIndex interface{}

	// The protocol to be used for any copy.  If the copy operation occurs locally
	// on the SNMP  agent (e.g. 'runningConfig' to 'startupConfig'), this object
	// may be ignored by the implementation. The type is ConfigCopyProtocol.
	CcCopyProtocol interface{}

	// Specifies the type of file to copy from. Either the ccCopySourceFileType or
	// the ccCopyDestFileType  (or both) must be of type 'runningConfig' or
	// 'startupConfig'. Also, the ccCopySourceFileType must be different from the
	// ccCopyDestFileType.  If the ccCopySourceFileType has the value of
	// 'networkFile', the ccCopyServerAddress/ ccCopyServerAddressRev1 and
	// ccCopyServerAddressType and ccCopyFileName must also be created, and 3
	// objects together (ccCopySourceFileType, ccCopyServerAddressRev1,
	// ccCopyFileName) will  uniquely identify the source file. If
	// ccCopyServerAddress is created then  ccCopyServerAddressRev1 will store the
	// same IP address and ccCopyServerAddressType will  take the value 'ipv4'.
	// If the ccCopySourceFileType is 'iosFile', the  ccCopyFileName must also be
	// created, and the  2 objects together (ccCopySourceFileType, ccCopyFileName)
	// will uniquely identify the source  file. The type is ConfigFileType.
	CcCopySourceFileType interface{}

	// specifies the type of file to copy to. Either the ccCopySourceFileType or
	// the ccCopyDestFileType  (or both) must be of type 'runningConfig' or
	// 'startupConfig'. Also, the ccCopySourceFileType  must be different from the
	// ccCopyDestFileType.  If the ccCopyDestFileType has the value of
	// 'networkFile', the  ccCopyServerAddress/ccCopyServerAddressType and
	// ccCopyServerAddressRev1 and ccCopyFileName must also be created, and 3
	// objects together (ccCopyDestFileType, ccCopyServerAddressRev1,
	// ccCopyFileName) will uniquely identify the  destination file. If
	// ccCopyServerAddress is created then ccCopyServerAddressRev1 will store the
	// same IP address and ccCopyServerAddressType will take the  value 'ipv4'.
	// If the ccCopyDestFileType is 'iosFile', the  ccCopyFileName must also be
	// created, and the 2 objects together (ccCopyDestFileType,  ccCopyFileName)
	// will uniquely identify the  destination file. The type is ConfigFileType.
	CcCopyDestFileType interface{}

	// The IP address of the TFTP server from (or to) which to copy the
	// configuration file. This object  must be created when either the
	// ccCopySourceFileType or ccCopyDestFileType has the value 'networkFile'.
	// Values of 0.0.0.0 or FF.FF.FF.FF for ccCopyServerAddress are not allowed.
	// Since this object can just hold only IPv4 Transport type, it is deprecated
	// and replaced by  ccCopyServerAddressRev1. The type is string with pattern:
	// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?.
	CcCopyServerAddress interface{}

	// The file name (including the path, if applicable) of the file. This object
	// must be created when either the ccCopySourceFileType or ccCopyDestFileType
	// has the value 'networkFile' or 'iosFile'. The type is string.
	CcCopyFileName interface{}

	// Remote username for copy via FTP, RCP, SFTP or SCP protocol. This object
	// must be created when the ccCopyProtocol is 'rcp', 'scp', 'ftp', or 'sftp'.
	// If the protocol is RCP, it will override the remote  username configured
	// through the          rcmd remote-username <username> configuration command.
	// The remote username is sent as the server username  in an RCP command
	// request sent by the system to a remote RCP server. The type is string with
	// length: 1..40.
	CcCopyUserName interface{}

	// Password used by FTP, SFTP or SCP for copying a file to/from an
	// FTP/SFTP/SCP server. This object  must be created when the ccCopyProtocol
	// is FTP or SCP.  Reading it returns a zero-length string for security
	// reasons. The type is string with length: 1..40.
	CcCopyUserPassword interface{}

	// Specifies whether or not a ccCopyCompletion notification should be issued
	// on completion of the TFTP transfer. If such a notification is desired,  it
	// is the responsibility of the management entity to ensure that the SNMP
	// administrative model is  configured in such a way as to allow the
	// notification to be delivered. The type is bool.
	CcCopyNotificationOnCompletion interface{}

	// Specifies the state of this config-copy request. This value of this object
	// is instantiated only after  the row has been instantiated, i.e. after the
	// ccCopyEntryRowStatus has been made active. The type is ConfigCopyState.
	CcCopyState interface{}

	// Specifies the time the ccCopyState last transitioned to 'running', or 0 if
	// the state has  never transitioned to 'running'(e.g., stuck in 'waiting'
	// state).  This object is instantiated only after the row has  been
	// instantiated. The type is interface{} with range: 0..4294967295.
	CcCopyTimeStarted interface{}

	// Specifies the time the ccCopyState last transitioned from 'running' to
	// 'successful' or  'failed' states. This object is instantiated only  after
	// the row has been instantiated. Its value will remain 0 until the request
	// has  completed. The type is interface{} with range: 0..4294967295.
	CcCopyTimeCompleted interface{}

	// The reason why the config-copy operation failed. This object is
	// instantiated only when the  ccCopyState for this entry is in the  'failed'
	// state. The type is ConfigCopyFailCause.
	CcCopyFailCause interface{}

	// The status of this table entry. Once the entry status is set to active, the
	// associated entry cannot  be modified until the request completes
	// (ccCopyState transitions to 'successful' or 'failed' state). The type is
	// RowStatus.
	CcCopyEntryRowStatus interface{}

	// This object indicates the transport type of the address contained in
	// ccCopyServerAddressRev1 object.  This must be created when either the
	// ccCopySourceFileType or ccCopyDestFileType has the value 'networkFile'. The
	// type is InetAddressType.
	CcCopyServerAddressType interface{}

	// The IP address of the TFTP server from (or to) which to copy the
	// configuration file. This object must be created when either the
	// ccCopySourceFileType or ccCopyDestFileType has the value 'networkFile'.
	// All bits as 0s or 1s for ccCopyServerAddressRev1 are not allowed.  The
	// format of this address depends on the value of  the ccCopyServerAddressType
	// object. The type is string with length: 0..255.
	CcCopyServerAddressRev1 interface{}
}

CISCOCONFIGCOPYMIB_CcCopyTable_CcCopyEntry A config-copy request.

A management station wishing to create an entry should first generate a random serial number to be used as the index to this sparse table. The station should then create the associated instance of the row status and row index objects. It must also, either in the same or in successive PDUs, create an instance of ccCopySourceFileType and ccCopyDestFileType.

At least one of the file types defined in ConfigFileType TC must be an agent-config file type (i.e. 'startupConfig' or 'runningConfig'). If one of the file types is a 'networkFile', a valid ccCopyFileName and ccCopyServerAddressType and ccCopyServerAddressRev1 or just ccCopyServerAddress must be created as well. If ccCopyServerAddress is created then ccCopyServerAddressRev1 will store the same IP address and ccCopyServerAddressType will take the value 'ipv4'.

For a file type of 'iosFile', only a valid ccCopyFileName needs to be created as an extra parameter.

It should also modify the default values for the other configuration objects if the defaults are not appropriate.

Once the appropriate instance of all the configuration objects have been created, either by an explicit SNMP set request or by default, the row status should be set to active to initiate the request. Note that this entire procedure may be initiated via a single set request which specifies a row status of createAndGo as well as specifies valid values for the non-defaulted configuration objects.

Once the config-copy request has been created (i.e. the ccCopyEntryRowStatus has been made active), the entry cannot be modified - the only operation possible after this is to delete the row.

Once the request completes, the management station should retrieve the values of the status objects of interest, and should then delete the entry. In order to prevent old entries from clogging the table, entries will be aged out, but an entry will ever be deleted within 5 minutes of completing.

func (*CISCOCONFIGCOPYMIB_CcCopyTable_CcCopyEntry) GetEntityData

type ConfigCopyFailCause

type ConfigCopyFailCause string

ConfigCopyFailCause represents requestAborted: config copy operation aborted.

const (
	ConfigCopyFailCause_unknown ConfigCopyFailCause = "unknown"

	ConfigCopyFailCause_badFileName ConfigCopyFailCause = "badFileName"

	ConfigCopyFailCause_timeout ConfigCopyFailCause = "timeout"

	ConfigCopyFailCause_noMem ConfigCopyFailCause = "noMem"

	ConfigCopyFailCause_noConfig ConfigCopyFailCause = "noConfig"

	ConfigCopyFailCause_unsupportedProtocol ConfigCopyFailCause = "unsupportedProtocol"

	ConfigCopyFailCause_someConfigApplyFailed ConfigCopyFailCause = "someConfigApplyFailed"

	ConfigCopyFailCause_systemNotReady ConfigCopyFailCause = "systemNotReady"

	ConfigCopyFailCause_requestAborted ConfigCopyFailCause = "requestAborted"
)

type ConfigCopyProtocol

type ConfigCopyProtocol string

ConfigCopyProtocol represents sftp: Secure File Transfer Protocol

const (
	ConfigCopyProtocol_tftp ConfigCopyProtocol = "tftp"

	ConfigCopyProtocol_ftp ConfigCopyProtocol = "ftp"

	ConfigCopyProtocol_rcp ConfigCopyProtocol = "rcp"

	ConfigCopyProtocol_scp ConfigCopyProtocol = "scp"

	ConfigCopyProtocol_sftp ConfigCopyProtocol = "sftp"
)

type ConfigCopyState

type ConfigCopyState string

ConfigCopyState represents unsuccessful.

const (
	ConfigCopyState_waiting ConfigCopyState = "waiting"

	ConfigCopyState_running ConfigCopyState = "running"

	ConfigCopyState_successful ConfigCopyState = "successful"

	ConfigCopyState_failed ConfigCopyState = "failed"
)

type ConfigFileType

type ConfigFileType string

ConfigFileType represents or even a MAC-based fabric.

const (
	ConfigFileType_networkFile ConfigFileType = "networkFile"

	ConfigFileType_iosFile ConfigFileType = "iosFile"

	ConfigFileType_startupConfig ConfigFileType = "startupConfig"

	ConfigFileType_runningConfig ConfigFileType = "runningConfig"

	ConfigFileType_terminal ConfigFileType = "terminal"

	ConfigFileType_fabricStartupConfig ConfigFileType = "fabricStartupConfig"
)

Jump to

Keyboard shortcuts

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