_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c4200
train
// Run runs a unit agent.
{ "resource": "" }
c4201
train
// APIWorkers returns a dependency.Engine running the unit agent's responsibilities.
{ "resource": "" }
c4202
train
// NewStateCrossControllerAPI creates a new server-side CrossModelRelations API facade // backed by global state.
{ "resource": "" }
c4203
train
// NewCrossControllerAPI returns a new server-side CrossControllerAPI facade.
{ "resource": "" }
c4204
train
// WatchControllerInfo creates a watcher that notifies when the API info // for the controller changes.
{ "resource": "" }
c4205
train
// ControllerInfo returns the API info for the controller.
{ "resource": "" }
c4206
train
// NewContextAPI returns a new Content for the given API client and data dir.
{ "resource": "" }
c4207
train
// Download downloads the named resource and returns the path // to which it was downloaded. If the resource does not exist or has // not been uploaded yet then errors.NotFound is returned. // // Note that the downloaded file is checked for correctness.
{ "resource": "" }
c4208
train
// attachmentLife queries the lifecycle state of each specified // attachment, and then partitions the IDs by them.
{ "resource": "" }
c4209
train
// removeEntities removes each specified Dead entity from state.
{ "resource": "" }
c4210
train
// removeAttachments removes each specified attachment from state.
{ "resource": "" }
c4211
train
// setStatus sets the given entity statuses, if any. If setting // the status fails the error is logged but otherwise ignored.
{ "resource": "" }
c4212
train
// NonCanonicalArchivePaths builds a new ArchivePaths using default // values, rooted at the provided rootDir. The path separator used is // platform-dependent. The resulting paths are suitable for locating // backup archive contents in a directory into which an archive has // been unpacked.
{ "resource": "" }
c4213
train
// NewArchiveWorkspaceReader returns a new archive workspace with a new // workspace dir populated from the archive. Note that this involves // unpacking the entire archive into a directory under the host's // "temporary" directory. For relatively large archives this could have // adverse effects on hosts with little d...
{ "resource": "" }
c4214
train
// Close cleans up the workspace dir.
{ "resource": "" }
c4215
train
// UnpackFilesBundle unpacks the archived files bundle into the targeted dir.
{ "resource": "" }
c4216
train
// OpenBundledFile returns an open ReadCloser for the corresponding file in // the archived files bundle.
{ "resource": "" }
c4217
train
// Metadata returns the metadata derived from the JSON file in the archive.
{ "resource": "" }
c4218
train
// NewArchiveReader returns a new archive data wrapper for the data in // the provided reader. Note that the entire archive will be read into // memory and kept there. So for relatively large archives it will often // be more appropriate to use ArchiveWorkspace instead.
{ "resource": "" }
c4219
train
// Metadata returns the metadata stored in the backup archive. If no // metadata is there, errors.NotFound is returned.
{ "resource": "" }
c4220
train
// Version returns the juju version under which the backup archive // was created. If no version is found in the archive, it must come // from before backup archives included the version. In that case we // return version 1.20.
{ "resource": "" }
c4221
train
// searchHook will search, in order, hooks suffixed with extensions // in windowsSuffixOrder. As windows cares about extensions to determine // how to execute a file, we will allow several suffixes, with powershell // being default.
{ "resource": "" }
c4222
train
// ProvisioningInfo returns the provisioning information for each given machine entity.
{ "resource": "" }
c4223
train
// machineTags returns machine-specific tags to set on the instance.
{ "resource": "" }
c4224
train
// machineSubnetsAndZones returns a map of subnet provider-specific id // to list of availability zone names for that subnet. The result can // be empty if there are no spaces constraints specified for the // machine, or there's an error fetching them.
{ "resource": "" }
c4225
train
// machineLXDProfileNames give the environ info to write lxd profiles needed for // the given machine and returns the names of profiles. Unlike // containerLXDProfilesInfo which returns the info necessary to write lxd profiles // via the lxd broker.
{ "resource": "" }
c4226
train
// availableImageMetadata returns all image metadata available to this machine // or an error fetching them.
{ "resource": "" }
c4227
train
// constructImageConstraint returns model-specific criteria used to look for image metadata.
{ "resource": "" }
c4228
train
// findImageMetadata returns all image metadata or an error fetching them. // It looks for image metadata in state. // If none are found, we fall back on original image search in simple streams.
{ "resource": "" }
c4229
train
// imageMetadataFromState returns image metadata stored in state // that matches given criteria.
{ "resource": "" }
c4230
train
// imageMetadataFromDataSources finds image metadata that match specified criteria in existing data sources.
{ "resource": "" }
c4231
train
// Implements sort.Interface and sorts image metadata by priority.
{ "resource": "" }
c4232
train
// NewHTTPBlobOpener returns a blob opener func suitable for use with // Download. The opener func uses an HTTP client that enforces the // provided SSL hostname verification policy.
{ "resource": "" }
c4233
train
// NewSha256Verifier returns a verifier suitable for Request. The // verifier checks the SHA-256 checksum of the file to ensure that it // matches the one returned by the provided func.
{ "resource": "" }
c4234
train
// Refresh refreshes the contents of the application from the underlying // state.
{ "resource": "" }
c4235
train
// CharmModifiedVersion increments every time the charm, or any part of it, is // changed in some way.
{ "resource": "" }
c4236
train
// SetStatus sets the status of the application if the passed unitName, // corresponding to the calling unit, is of the leader.
{ "resource": "" }
c4237
train
// Status returns the status of the application if the passed unitName, // corresponding to the calling unit, is of the leader.
{ "resource": "" }
c4238
train
// WatchLeadershipSettings returns a watcher which can be used to wait // for leadership settings changes to be made for the application.
{ "resource": "" }
c4239
train
// ParseIngressRules parses the output of "iptables -L INPUT -n", // extracting previously added ingress rules, as rendered by // IngressRuleCommand.
{ "resource": "" }
c4240
train
// popField pops a pops a field off the front of the given string // by splitting on the first run of whitespace, and returns the // field and remainder. A boolean result is returned indicating // whether or not a field was found.
{ "resource": "" }
c4241
train
// OAuthConfig returns an azure.OAuthConfig based on the given resource // manager endpoint and subscription ID. This will make a request to the // resource manager API to discover the Active Directory tenant ID.
{ "resource": "" }
c4242
train
// newEnviron create a new Joyent environ instance from config.
{ "resource": "" }
c4243
train
// GetLastSent makes a "GetLastSent" call on the facade and returns the // results in the same order.
{ "resource": "" }
c4244
train
// SetLastSent makes a "SetLastSent" call on the facade and returns the // results in the same order.
{ "resource": "" }
c4245
train
// NewReader returns a new Reader using the supplied config, or an error. // // Readers will not function past the lifetime of their configured Mongo.
{ "resource": "" }
c4246
train
// Now returns the current global time.
{ "resource": "" }
c4247
train
// ModelStatus returns a status summary for each model tag passed in.
{ "resource": "" }
c4248
train
// OnlyConnect logs into the API using the supplied agent's credentials.
{ "resource": "" }
c4249
train
// NewExternalControllerConnection returns an api connection to a controller // with the specified api info.
{ "resource": "" }
c4250
train
// StoreCharmArchive stores a charm archive in environment storage.
{ "resource": "" }
c4251
train
// charmArchiveStoragePath returns a string that is suitable as a // storage path, using a random UUID to avoid colliding with concurrent // uploads.
{ "resource": "" }
c4252
train
// NewAPI creates a new client-side Subnets facade.
{ "resource": "" }
c4253
train
// AddSubnet adds an existing subnet to the model.
{ "resource": "" }
c4254
train
// CreateSubnet creates a new subnet with the provider.
{ "resource": "" }
c4255
train
// ListSubnets fetches all the subnets known by the model.
{ "resource": "" }
c4256
train
// MongoIndexes returns the indexes to apply to the clouldimagemetadata collection. // We return an index that expires records containing a created-at field after 5 minutes.
{ "resource": "" }
c4257
train
// SaveMetadataNoExpiry implements Storage.SaveMetadataNoExpiry and behaves as save-or-update. // Records will not expire.
{ "resource": "" }
c4258
train
// SaveMetadata implements Storage.SaveMetadata and behaves as save-or-update. // Records will expire after a set time.
{ "resource": "" }
c4259
train
// DeleteMetadata implements Storage.DeleteMetadata.
{ "resource": "" }
c4260
train
// AllCloudImageMetadata returns all cloud image metadata in the model.
{ "resource": "" }
c4261
train
// FindMetadata implements Storage.FindMetadata. // Results are sorted by date created and grouped by source.
{ "resource": "" }
c4262
train
// SupportedArchitectures implements Storage.SupportedArchitectures.
{ "resource": "" }
c4263
train
// putState writes the given data to the state file on the given storage. // The file's name is as defined in StateFile.
{ "resource": "" }
c4264
train
// CreateStateFile creates an empty state file on the given storage, and // returns its URL.
{ "resource": "" }
c4265
train
// SaveState writes the given state to the given storage.
{ "resource": "" }
c4266
train
// LoadState reads state from the given storage.
{ "resource": "" }
c4267
train
// AddStateInstance adds a controller instance ID to the provider-state // file in storage.
{ "resource": "" }
c4268
train
// RemoveStateInstances removes controller instance IDs from the // provider-state file in storage. Instance IDs that are not found // in the file are ignored.
{ "resource": "" }
c4269
train
// ProviderStateInstances extracts the instance IDs from provider-state.
{ "resource": "" }
c4270
train
// NewFacade returns a new CAAS firewaller Facade facade.
{ "resource": "" }
c4271
train
// IsExposed returns whether the specified applications are exposed.
{ "resource": "" }
c4272
train
// Run implemetns Command.Run.
{ "resource": "" }
c4273
train
// ValidateToolsMetadata attempts to load tools metadata for the specified cloud attributes and returns // any tools versions found, or an error if the metadata could not be loaded.
{ "resource": "" }
c4274
train
// Save stores the specified firewall rule.
{ "resource": "" }
c4275
train
// Rule returns the firewall rule for the specified service.
{ "resource": "" }
c4276
train
// AllRules returns all the firewall rules.
{ "resource": "" }
c4277
train
// acquireExecutionLock acquires the machine-level execution lock and returns a function to be used // to unlock it.
{ "resource": "" }
c4278
train
// CreateCloudAccess creates a new access permission for a user on a cloud.
{ "resource": "" }
c4279
train
// GetCloudAccess gets the access permission for the specified user on a cloud.
{ "resource": "" }
c4280
train
// GetCloudUsers gets the access permissions on a cloud.
{ "resource": "" }
c4281
train
// UpdateCloudAccess changes the user's access permissions on a cloud.
{ "resource": "" }
c4282
train
// RemoveCloudAccess removes the access permission for a user on a cloud.
{ "resource": "" }
c4283
train
// CloudsForUser returns details including access level of clouds which can // be seen by the specified user, or all users if the caller is a superuser.
{ "resource": "" }
c4284
train
// cloudNamesForUser returns the cloud names a user can see.
{ "resource": "" }
c4285
train
// NewMachineInitReader creates and returns a new MachineInitReader for the // input series.
{ "resource": "" }
c4286
train
// GetInitConfig returns a map of configuration data used to provision the // machine. It is sourced from both Cloud-Init and Curtin data.
{ "resource": "" }
c4287
train
// getMachineCloudCfgDirData returns a map of the combined machine's Cloud-Init // cloud.cfg.d config files. Files are read in lexical order.
{ "resource": "" }
c4288
train
// unmarshallConfigFile reads the file at the input path, // decompressing it if required, and converts the contents to a map of // configuration key-values.
{ "resource": "" }
c4289
train
// fileAsConfigMap reads the file at the input path and returns its contents as // raw bytes, and if possible a map of config key-values.
{ "resource": "" }
c4290
train
// extractPropertiesFromConfig filters the input config based on the // input properties and returns a map of cloud-init data, compatible with // version 0.7.8 and above.
{ "resource": "" }
c4291
train
// extractPropertiesFromConfigLegacy filters the input config based on the // input properties and returns a map of cloud-init data, compatible with // version 0.7.7 and below.
{ "resource": "" }
c4292
train
// authorizeCharmStoreEntity acquires and return the charm store delegatable macaroon to be // used to add the charm corresponding to the given URL. // The macaroon is properly attenuated so that it can only be used to deploy // the given charm URL.
{ "resource": "" }
c4293
train
// WatchApplication returns a NotifyWatcher that notifies of // changes to the application in the current model.
{ "resource": "" }
c4294
train
// Life returns the lifecycle state for the specified CAAS application // in the current model.
{ "resource": "" }
c4295
train
// IsExposed returns whether the specified CAAS application // in the current model is exposed.
{ "resource": "" }
c4296
train
// Arch returns the architecture to be used.
{ "resource": "" }
c4297
train
// ValidateDomainParams implements libvirt.domainParams.
{ "resource": "" }
c4298
train
// CreateMachine creates a virtual machine and starts it.
{ "resource": "" }
c4299
train
// Setup the default values for params.
{ "resource": "" }