_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c177000
// FieldColumns converts thegiven fields to list of column names separated // by a comma.
c177001
// FieldArgs converts the given fields to function arguments, rendering their // name and type.
c177002
// FieldParams converts the given fields to function parameters, rendering their // name.
c177003
// FieldCriteria converts the given fields to AND-separated WHERE criteria.
c177004
// Helper to initialize LXD clustering. // // Used by the 'lxd init' command.
c177005
// formatValue formats a value for serialization
c177006
// ResolveTarget is a convenience for handling the value ?targetNode query // parameter. It returns the address of the given node, or the empty string if // the given node is the local one.
c177007
// Write in ProgressWriter is the same as io.Write
c177008
// Update the schema and api_extensions columns of the row in the nodes table // that matches the given id. // // If not such row is found, an error is returned.
c177009
// Return a slice of binary integer tuples. Each tuple contains the schema // version and number of api extensions of a node in the cluster.
c177010
// GetArchitectures returns the list of supported architectures.
c177011
// RuntimeLiblxcVersionAtLeast checks if the system's liblxc matches the // provided version requirement
c177012
// GetExecPath returns the path to the current binary
c177013
// Connect is a convenience around lxd.ConnectLXD that configures the client // with the correct parameters for node-to-node communication. // // If 'notify' switch is true, then the user agent will be set to the special // value 'lxd-cluster-notifier', which can be used in some cases to distinguish // between a regula...
c177014
// ConnectIfContainerIsRemote figures out the address of the node which is // running the container with the given name. If it's not the local node will // connect to it and return the connected client, otherwise it will just return // nil.
c177015
// ConnectIfVolumeIsRemote figures out the address of the node on which the // volume with the given name is defined. If it's not the local node will // connect to it and return the connected client, otherwise it will just return // nil. // // If there is more than one node with a matching volume name, an error is // r...
c177016
// SetupTrust is a convenience around ContainerServer.CreateCertificate that // adds the given client certificate to the trusted pool of the cluster at the // given address, using the given password.
c177017
// GetStoragePools returns a list of StoragePool entries
c177018
// GetStoragePool returns a StoragePool entry for the provided pool name
c177019
// CreateStoragePool defines a new storage pool using the provided StoragePool struct
c177020
// UpdateStoragePool updates the pool to match the provided StoragePool struct
c177021
// DeleteStoragePool deletes a storage pool
c177022
// GetStoragePoolResources gets the resources available to a given storage pool
c177023
// Make sure all our directories are available.
c177024
// Config fetches all LXD node-level config keys.
c177025
// UpdateConfig updates the given LXD node-level configuration keys in the // config table. Config keys set to empty values will be deleted.
c177026
// Config fetches all LXD cluster config keys.
c177027
// UpdateConfig updates the given LXD cluster configuration keys in the // config table. Config keys set to empty values will be deleted.
c177028
// This helper deletes any node-specific values from the config object, since // they should not be part of the calculated etag.
c177029
// Event handling functions // GetEvents connects to the LXD monitoring interface
c177030
// LogfmtFormat return a formatter for a text log file
c177031
// StorageVolumeNodeAddresses returns the addresses of all nodes on which the // volume with the given name if defined. // // The empty string is used in place of the address of the current node.
c177032
// StorageVolumeNodeGet returns the name of the node a storage volume is on.
c177033
// StorageVolumeConfigGet gets the config of a storage volume.
c177034
// StorageVolumeDescriptionGet gets the description of a storage volume.
c177035
// StorageVolumeIsAvailable checks that if a custom volume available for being attached. // // Always return true for non-Ceph volumes. // // For Ceph volumes, return true if the volume is either not attached to any // other container, or attached to containers on this node.
c177036
// StorageVolumeDescriptionUpdate updates the description of a storage volume.
c177037
// StorageVolumeConfigAdd adds a new storage volume config into database.
c177038
// StorageVolumeConfigClear deletes storage volume config.
c177039
// Get the IDs of all volumes with the given name and type associated with the // given pool, regardless of their node_id column.
c177040
// StorageVolumeCleanupImages removes the volumes with the given fingerprints.
c177041
// StorageVolumeMoveToLVMThinPoolNameKey upgrades the config keys of LVM // volumes.
c177042
// L accumulates a single line of source code.
c177043
// Returns the source code to add to the target file.
c177044
// Pretty will attempt to convert any Go structure into a string suitable for logging
c177045
// NetworkPublicKey returns the public key of the TLS certificate used by the // network endpoint.
c177046
// NetworkPrivateKey returns the private key of the TLS certificate used by the // network endpoint.
c177047
// NetworkCert returns the full TLS certificate information for this endpoint.
c177048
// NetworkAddress returns the network addresss of the network endpoint, or an // empty string if there's no network endpoint
c177049
// NetworkUpdateAddress updates the address for the network endpoint, shutting // it down and restarting it.
c177050
// NetworkUpdateCert updates the TLS keypair and CA used by the network // endpoint. // // If the network endpoint is active, in-flight requests will continue using // the old certificate, and only new requests will use the new one.
c177051
// Create a new net.Listener bound to the tcp socket of the network endpoint.
c177052
// Accept waits for and returns the next incoming TLS connection then use the // current TLS configuration to handle it.
c177053
// Config safely swaps the underlying TLS configuration.
c177054
// IsOffline returns true if the last successful heartbeat time of the node is // older than the given threshold.
c177055
// NodeByAddress returns the node with the given network address.
c177056
// NodePendingByAddress returns the pending node with the given network address.
c177057
// NodeByName returns the node with the given name.
c177058
// NodeName returns the name of the node this method is invoked on.
c177059
// NodeAddress returns the address of the node this method is invoked on.
c177060
// NodeIsOutdated returns true if there's some cluster node having an API or // schema version greater than the node this method is invoked on.
c177061
// NodesCount returns the number of nodes in the LXD cluster. // // Since there's always at least one node row, even when not-clustered, the // return value is greater than zero
c177062
// NodeRename changes the name of an existing node. // // Return an error if a node with the same name already exists.
c177063
// Nodes returns all LXD nodes part of the cluster.
c177064
// NodeAdd adds a node to the current list of LXD nodes that are part of the // cluster. It returns the ID of the newly inserted row.
c177065
// NodePending toggles the pending flag for the node. A node is pending when // it's been accepted in the cluster, but has not yet actually joined it.
c177066
// NodeUpdate updates the name an address of a node.
c177067
// NodeRemove removes the node with the given id.
c177068
// NodeHeartbeat updates the heartbeat column of the node with the given address.
c177069
// NodeIsEmpty returns an empty string if the node with the given ID has no // containers or images associated with it. Otherwise, it returns a message // say what's left.
c177070
// NodeClear removes any container or image associated with this node.
c177071
// NodeOfflineThreshold returns the amount of time that needs to elapse after // which a series of unsuccessful heartbeat will make the node be considered // offline.
c177072
// NodeUpdateVersion updates the schema and API version of the node with the // given id. This is used only in tests.
c177073
// Transaction executes the given function within a database transaction.
c177074
// Rollback a transaction after the given error occurred. If the rollback // succeeds the given error is returned, otherwise a new error that wraps it // gets generated and returned.
c177075
// ProfileURIs returns all available profile URIs.
c177076
// ProfileGet returns the profile with the given key.
c177077
// ProfileExists checks if a profile with the given key exists.
c177078
// ProfileConfigRef returns entities used by profiles.
c177079
// ProfileUsedByRef returns entities used by profiles.
c177080
// ProfileCreate adds a new profile to the database.
c177081
// ProfileRename renames the profile matching the given key parameters.
c177082
// ProfileDelete deletes the profile matching the given key parameters.
c177083
// ServerTLSConfig returns a new server-side tls.Config generated from the give // certificate info.
c177084
// NetworkInterfaceAddress returns the first non-loopback address of any of the // system network interfaces. // // Return the empty string if none is found.
c177085
// IsAddressCovered detects if network address1 is actually covered by // address2, in the sense that they are either the same address or address2 is // specified using a wildcard with the same port of address1.
c177086
// SelectObjects executes a statement which must yield rows with a specific // columns schema. It invokes the given Dest hook for each yielded row.
c177087
// DeleteObject removes the row identified by the given ID. The given table // must have a primary key column called 'id'. // // It returns a flag indicating if a matching row was actually found and // deleted or not.
c177088
// Execute the our task function according to our schedule, until the given // context gets cancelled.
c177089
// IsTerminal returns true if the given file descriptor is a terminal.
c177090
// Bind to the given unix socket path.
c177091
// Remove any stale socket file at the given path.
c177092
// Change the file mode of the given unix socket file,
c177093
// Change the ownership of the given unix socket file,
c177094
// cephOSDPoolExists checks whether a given OSD pool exists.
c177095
// cephOSDPoolDestroy destroys an OSD pool. // - A call to cephOSDPoolDestroy will destroy a pool including any storage // volumes that still exist in the pool. // - In case the OSD pool that is supposed to be deleted does not exist this // command will still exit 0. This means that if the caller wants to be sure /...
c177096
// cephRBDVolumeExists checks whether a given RBD storage volume exists.
c177097
// cephRBDSnapshotProtect protects a given snapshot from being deleted // This is a precondition to be able to create RBD clones from a given snapshot.
c177098
// cephRBDCloneCreate creates a clone from a protected RBD snapshot
c177099
// cephRBDSnapshotListClones list all clones of an RBD snapshot