_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c176700
test
// Internal MAAS handling
{ "resource": "" }
c176701
test
// getSystemHandler on Linux writes messages to syslog.
{ "resource": "" }
c176702
test
// Return string for minor number of nvidia device corresponding to the given pci id
{ "resource": "" }
c176703
test
// GetLogger returns a logger suitable for using as logger.Log.
{ "resource": "" }
c176704
test
// SetLogger installs the given logger as global logger. It returns a function // that can be used to restore whatever logger was installed beforehand.
{ "resource": "" }
c176705
test
// WaitRecord blocks until a log.Record is received on the given channel. It // returns the emitted record, or nil if no record was received within the // given timeout. Useful in conjunction with log.ChannelHandler, for // asynchronous testing.
{ "resource": "" }
c176706
test
// AddContext will return a copy of the logger with extra context added
{ "resource": "" }
c176707
test
// NewDottedVersion returns a new Version.
{ "resource": "" }
c176708
test
// Parse parses a string starting with a dotted version and returns it.
{ "resource": "" }
c176709
test
// String returns version as a string
{ "resource": "" }
c176710
test
// Compare returns result of comparison between two versions
{ "resource": "" }
c176711
test
// Create the default profile of a project.
{ "resource": "" }
c176712
test
// Common logic between PUT and PATCH.
{ "resource": "" }
c176713
test
// Check if a project is empty.
{ "resource": "" }
c176714
test
// Certificate handling functions // GetCertificateFingerprints returns a list of certificate fingerprints
{ "resource": "" }
c176715
test
// GetCertificates returns a list of certificates
{ "resource": "" }
c176716
test
// GetCertificate returns the certificate entry for the provided fingerprint
{ "resource": "" }
c176717
test
// CreateCertificate adds a new certificate to the LXD trust store
{ "resource": "" }
c176718
test
// UpdateCertificate updates the certificate definition
{ "resource": "" }
c176719
test
// DeleteCertificate removes a certificate from the LXD trust store
{ "resource": "" }
c176720
test
// Return a list of templates used in a container or the content of a template
{ "resource": "" }
c176721
test
// Add a container template file
{ "resource": "" }
c176722
test
// Delete a container template
{ "resource": "" }
c176723
test
// Return the full path of a container template.
{ "resource": "" }
c176724
test
// Error implements the error interface.
{ "resource": "" }
c176725
test
// ErrorList implements the error interface.
{ "resource": "" }
c176726
test
// Add adds an Error with given key name, value and reason.
{ "resource": "" }
c176727
test
// UpdateSchema updates the schema.go file of the cluster and node databases.
{ "resource": "" }
c176728
test
// Like doProfileUpdate but does not update the database, since it was already // updated by doProfileUpdate itself, called on the notifying node.
{ "resource": "" }
c176729
test
// Profile update of a single container.
{ "resource": "" }
c176730
test
// Query the db for information about containers associated with the given // profile.
{ "resource": "" }
c176731
test
// GetNetworkNames returns a list of network names
{ "resource": "" }
c176732
test
// GetNetworks returns a list of Network struct
{ "resource": "" }
c176733
test
// GetNetwork returns a Network entry for the provided name
{ "resource": "" }
c176734
test
// GetNetworkLeases returns a list of Network struct
{ "resource": "" }
c176735
test
// GetNetworkState returns metrics and information on the running network
{ "resource": "" }
c176736
test
// CreateNetwork defines a new network using the provided Network struct
{ "resource": "" }
c176737
test
// UpdateNetwork updates the network to match the provided Network struct
{ "resource": "" }
c176738
test
// RenameNetwork renames an existing network entry
{ "resource": "" }
c176739
test
// Open the cluster database object. // // The name argument is the name of the cluster database. It defaults to // 'db.bin', but can be overwritten for testing. // // The dialer argument is a function that returns a gRPC dialer that can be // used to connect to a database node using the gRPC SQL package.
{ "resource": "" }
c176740
test
// URLEncode encodes a path and query parameters to a URL.
{ "resource": "" }
c176741
test
// IsUnixSocket returns true if the given path is either a Unix socket // or a symbolic link pointing at a Unix socket.
{ "resource": "" }
c176742
test
// HostPath returns the host path for the provided path // On a normal system, this does nothing // When inside of a snap environment, returns the real path
{ "resource": "" }
c176743
test
// FileMove tries to move a file by using os.Rename, // if that fails it tries to copy the file and remove the source.
{ "resource": "" }
c176744
test
// DirCopy copies a directory recursively, overwriting the target if it exists.
{ "resource": "" }
c176745
test
// StringMapHasStringKey returns true if any of the supplied keys are present in the map.
{ "resource": "" }
c176746
test
// Spawn the editor with a temporary YAML file for editing configs
{ "resource": "" }
c176747
test
// WriteTempFile creates a temp file with the specified content
{ "resource": "" }
c176748
test
// RenderTemplate renders a pongo2 template.
{ "resource": "" }
c176749
test
// Every returns a Schedule that always returns the given time interval.
{ "resource": "" }
c176750
test
// Currently only used for loop-backed LVM storage pools. Can be called without // overhead since it is essentially a noop for non-loop-backed LVM storage // pools.
{ "resource": "" }
c176751
test
// Dump returns a SQL text dump of all rows across all tables, similar to // sqlite3's dump feature
{ "resource": "" }
c176752
test
// Dump a single table, returning a SQL text containing statements for its // schema and data.
{ "resource": "" }
c176753
test
// ProjectHasProfiles is a helper to check if a project has the profiles // feature enabled.
{ "resource": "" }
c176754
test
// ProjectNames returns the names of all available projects.
{ "resource": "" }
c176755
test
// ProjectMap returns the names and ids of all available projects.
{ "resource": "" }
c176756
test
// ProjectHasImages is a helper to check if a project has the images // feature enabled.
{ "resource": "" }
c176757
test
// ProjectUpdate updates the project matching the given key parameters.
{ "resource": "" }
c176758
test
// GetCluster returns information about a cluster // // If this client is not trusted, the password must be supplied
{ "resource": "" }
c176759
test
// UpdateCluster requests to bootstrap a new cluster or join an existing one.
{ "resource": "" }
c176760
test
// GetClusterMemberNames returns the URLs of the current members in the cluster
{ "resource": "" }
c176761
test
// GetClusterMembers returns the current members of the cluster
{ "resource": "" }
c176762
test
// GetClusterMember returns information about the given member
{ "resource": "" }
c176763
test
// RenameClusterMember changes the name of an existing member
{ "resource": "" }
c176764
test
// Disconnect must be used once done listening for events
{ "resource": "" }
c176765
test
// CompareVersions the versions of two LXD nodes. // // A version consists of the version the node's schema and the number of API // extensions it supports. // // Return 0 if they equal, 1 if the first version is greater than the second // and 2 if the second is greater than the first. // // Return an error if inconsis...
{ "resource": "" }
c176766
test
// HasClientCertificate will return true if a client certificate has already been generated
{ "resource": "" }
c176767
test
// GenerateClientCertificate will generate the needed client.crt and client.key if needed
{ "resource": "" }
c176768
test
// LoadModule loads the kernel module with the given name, by invoking // modprobe.
{ "resource": "" }
c176769
test
// Parse runs the Go parser against the given package name.
{ "resource": "" }
c176770
test
// PprofAddress returns the network addresss of the pprof endpoint, or an empty string if there's no pprof endpoint
{ "resource": "" }
c176771
test
// PprofUpdateAddress updates the address for the pprof endpoint, shutting it down and restarting it.
{ "resource": "" }
c176772
test
// NewMethod return a new method code snippet for executing a certain mapping.
{ "resource": "" }
c176773
test
// Generate the desired method.
{ "resource": "" }
c176774
test
// Populate a field consisting of a slice of objects referencing the // entity. This information is available by joining a the view or table // associated with the type of the referenced objects, which must contain the // natural key of the entity.
{ "resource": "" }
c176775
test
// StoragePoolID returns the ID of the pool with the given name.
{ "resource": "" }
c176776
test
// StoragePoolIDsNotPending returns a map associating each storage pool name to its ID. // // Pending storage pools are skipped.
{ "resource": "" }
c176777
test
// StoragePoolNodeJoin adds a new entry in the storage_pools_nodes table. // // It should only be used when a new node joins the cluster, when it's safe to // assume that the relevant pool has already been created on the joining node, // and we just need to track it.
{ "resource": "" }
c176778
test
// StoragePoolNodeJoinCeph updates internal state to reflect that nodeID is // joining a cluster where poolID is a ceph pool.
{ "resource": "" }
c176779
test
// StoragePoolConfigAdd adds a new entry in the storage_pools_config table
{ "resource": "" }
c176780
test
// StoragePoolCreatePending creates a new pending storage pool on the node with // the given name.
{ "resource": "" }
c176781
test
// StoragePoolCreated sets the state of the given pool to "Created".
{ "resource": "" }
c176782
test
// StoragePoolErrored sets the state of the given pool to "Errored".
{ "resource": "" }
c176783
test
// StoragePoolNodeConfigs returns the node-specific configuration of all // nodes grouped by node name, for the given poolID. // // If the storage pool is not defined on all nodes, an error is returned.
{ "resource": "" }
c176784
test
// StoragePoolsGetDrivers returns the names of all storage volumes attached to // a given storage pool.
{ "resource": "" }
c176785
test
// StoragePoolGetID returns the id of a single storage pool.
{ "resource": "" }
c176786
test
// StoragePoolGet returns a single storage pool.
{ "resource": "" }
c176787
test
// Return the names of the nodes the given pool is defined on.
{ "resource": "" }
c176788
test
// StoragePoolConfigGet returns the config of a storage pool.
{ "resource": "" }
c176789
test
// StoragePoolCreate creates new storage pool.
{ "resource": "" }
c176790
test
// Add new storage pool config.
{ "resource": "" }
c176791
test
// StoragePoolUpdate updates a storage pool.
{ "resource": "" }
c176792
test
// StoragePoolConfigClear deletes the storage pool config.
{ "resource": "" }
c176793
test
// StoragePoolDelete deletes storage pool.
{ "resource": "" }
c176794
test
// StoragePoolVolumesGetNames gets the names of all storage volumes attached to // a given storage pool.
{ "resource": "" }
c176795
test
// StoragePoolVolumesGet returns all storage volumes attached to a given // storage pool on any node.
{ "resource": "" }
c176796
test
// StoragePoolNodeVolumesGet returns all storage volumes attached to a given // storage pool on the current node.
{ "resource": "" }
c176797
test
// Returns all storage volumes attached to a given storage pool on the given // node.
{ "resource": "" }
c176798
test
// StoragePoolVolumesGetType get all storage volumes attached to a given // storage pool of a given volume type, on the given node.
{ "resource": "" }
c176799
test
// StoragePoolVolumeSnapshotsGetType get all snapshots of a storage volume // attached to a given storage pool of a given volume type, on the given node.
{ "resource": "" }