_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c154500
train
// GetInfo is part of the Relations interface.
{ "resource": "" }
c154501
train
// add causes the unit agent to join the supplied relation, and to // store persistent state in the supplied dir. It will block until the // operation succeeds or fails; or until the abort chan is closed, in // which case it will return resolver.ErrLoopAborted.
{ "resource": "" }
c154502
train
// setDying notifies the relationer identified by the supplied id that the // only hook executions to be requested should be those necessary to cleanly // exit the relation.
{ "resource": "" }
c154503
train
// AuthAny returns an AuthFunc generator that returns an AuthFunc that // accepts any tag authorized by any of its arguments. If no arguments // are passed this is equivalent to AuthNever.
{ "resource": "" }
c154504
train
// AuthAlways returns an authentication function that always returns true iff it is passed a valid tag.
{ "resource": "" }
c154505
train
// AuthFuncForTag returns an authentication function that always returns true iff it is passed a specific tag.
{ "resource": "" }
c154506
train
// AuthFuncForTagKind returns a GetAuthFunc which creates an AuthFunc // allowing only the given tag kind and denies all others. Passing an // empty kind is an error.
{ "resource": "" }
c154507
train
// AuthFuncForMachineAgent returns a GetAuthFunc which creates an AuthFunc // allowing only machine agents and their controllers
{ "resource": "" }
c154508
train
// convertConstraints converts the given constraints into an url.Values object // suitable to pass to MAAS when acquiring a node. CpuPower is ignored because // it cannot be translated into something meaningful for MAAS right now.
{ "resource": "" }
c154509
train
// convertConstraints2 converts the given constraints into a // gomaasapi.AllocateMachineArgs for paasing to MAAS 2.
{ "resource": "" }
c154510
train
// convertSpacesFromConstraints extracts spaces from constraints and converts // them to two lists of positive and negative spaces.
{ "resource": "" }
c154511
train
// addStorage converts volume information into url.Values object suitable to // pass to MAAS when acquiring a node.
{ "resource": "" }
c154512
train
// addStorage2 adds volume information onto a gomaasapi.AllocateMachineArgs // object suitable to pass to MAAS 2 when acquiring a node.
{ "resource": "" }
c154513
train
// resourceTagsToDiskLabels translates a set of // resource tags, provided by Juju, to disk labels.
{ "resource": "" }
c154514
train
// start is a dependency.StartFunc that uses config.
{ "resource": "" }
c154515
train
// FlagManifold runs a worker that implements engine.Flag such that // it's only considered set when the referenced gate is unlocked.
{ "resource": "" }
c154516
train
// NewFlag returns a worker that implements engine.Flag, // backed by the supplied gate's unlockedness.
{ "resource": "" }
c154517
train
// bounceUnlocked returns dependency.ErrBounce if passed an error caused // by ErrUnlocked; and otherwise returns the original error.
{ "resource": "" }
c154518
train
// Instances implements environs.Environ. // // This method will only ever return an Instance for the Id // BootstrapInstanceId. If any others are specified, then // ErrPartialInstances or ErrNoInstances will result.
{ "resource": "" }
c154519
train
// LogProgressCmd will return a command to log the specified progress // message to stderr; the resultant command should be added to the // configuration as a runcmd or bootcmd as appropriate. // // If there are any uses of LogProgressCmd in a configuration, the // configuration MUST precede the command with the result...
{ "resource": "" }
c154520
train
// NewIsLeaderCommand returns a new isLeaderCommand with the given context.
{ "resource": "" }
c154521
train
// generateListFilesystemOutput returns a map filesystem IDs to filesystem info
{ "resource": "" }
c154522
train
// convertToFilesystemInfo returns a map of filesystem IDs to filesystem info.
{ "resource": "" }
c154523
train
// NewStatusGetter returns a new StatusGetter. The GetAuthFunc will be // used on each invocation of Status to determine current // permissions.
{ "resource": "" }
c154524
train
// Status returns the status of each given entity.
{ "resource": "" }
c154525
train
// NewApplicationStatusGetter returns a ApplicationStatusGetter.
{ "resource": "" }
c154526
train
// Status returns the status of the Application for each given Unit tag.
{ "resource": "" }
c154527
train
// EntityStatusFromState converts a state.StatusInfo into a params.EntityStatus.
{ "resource": "" }
c154528
train
// NewErrWriter wraps w in a type that will cause all writes to be written as // ansi terminal BrightRed.
{ "resource": "" }
c154529
train
// Supports is defined on the Provider interface.
{ "resource": "" }
c154530
train
// DefaultPools is defined on the Provider interface.
{ "resource": "" }
c154531
train
// parseVolumeOptions uses storage volume parameters to make a struct used to create volumes.
{ "resource": "" }
c154532
train
// Validate returns an error if the configuration contains invalid information // or missing resources.
{ "resource": "" }
c154533
train
// InstallBufferedLogWriter creates and returns a new BufferedLogWriter, // registering it with Loggo.
{ "resource": "" }
c154534
train
// UninstallBufferedLogWriter removes the BufferedLogWriter previously // installed by InstallBufferedLogWriter and closes it.
{ "resource": "" }
c154535
train
// NewBufferedLogWriter returns a new BufferedLogWriter which will // cache up to maxLen log messages.
{ "resource": "" }
c154536
train
// Write sends a new log message to the writer. This implements the loggo.Writer interface.
{ "resource": "" }
c154537
train
// Stats returns the current LogStats for this BufferedLogWriter.
{ "resource": "" }
c154538
train
// String returns the item change in a readable format.
{ "resource": "" }
c154539
train
// MakeAddition returns an itemChange indicating a modification of the input // key, with its new value.
{ "resource": "" }
c154540
train
// MakeModification returns an ItemChange indicating a modification of the // input key, with its old and new values.
{ "resource": "" }
c154541
train
// MakeDeletion returns an ItemChange indicating a deletion of the input key, // with its old value.
{ "resource": "" }
c154542
train
// ApplyDeltaSource uses this second-order delta to generate a first-older // delta. // It accepts a collection of changes representing a previous state. // These are combined with the current changes to generate a new collection. // It addresses a requirement that each branch change should represent the // "from" stat...
{ "resource": "" }
c154543
train
// CurrentSettings returns the current effective values indicated by this set // of changes. It uses the input default settings to return a value for items // that have been deleted.
{ "resource": "" }
c154544
train
// Map is a convenience method for working with collections of changes. // It returns a map representation of the change collection, // indexed with the change key. // An error return indicates that the collection had duplicate keys.
{ "resource": "" }
c154545
train
// newAuthContext creates a new authentication context for st.
{ "resource": "" }
c154546
train
// authenticator returns an authenticator.EntityAuthenticator for the API // connection associated with the specified API server host.
{ "resource": "" }
c154547
train
// Authenticate implements authentication.EntityAuthenticator // by choosing the right kind of authentication for the given // tag.
{ "resource": "" }
c154548
train
// authenticatorForTag returns the authenticator appropriate // to use for a login with the given possibly-nil tag.
{ "resource": "" }
c154549
train
// localUserAuth returns an authenticator that can authenticate logins for // local users with either passwords or macaroons.
{ "resource": "" }
c154550
train
// externalMacaroonAuth returns an authenticator that can authenticate macaroon-based // logins for external users. If it fails once, it will always fail.
{ "resource": "" }
c154551
train
// newExternalMacaroonAuth returns an authenticator that can authenticate // macaroon-based logins for external users. This is just a helper function // for authCtxt.externalMacaroonAuth.
{ "resource": "" }
c154552
train
// LoadModelStatus retrieves all the status documents for the model // at once. Used to primarily speed up status.
{ "resource": "" }
c154553
train
// Model returns the status of the model.
{ "resource": "" }
c154554
train
// MachineAgent returns the status of the machine agent.
{ "resource": "" }
c154555
train
// MachineInstance returns the status of the machine instance.
{ "resource": "" }
c154556
train
// MachineModification returns the status of the machine modification
{ "resource": "" }
c154557
train
// FullUnitWorkloadVersion returns the full status info for the workload // version of a unit. This is used for selecting the workload version for // an application.
{ "resource": "" }
c154558
train
// UnitWorkloadVersion returns workload version for the unit
{ "resource": "" }
c154559
train
// UnitAgent returns the status of the Unit's agent.
{ "resource": "" }
c154560
train
// UnitWorkload returns the status of the unit's workload.
{ "resource": "" }
c154561
train
// caasApplicationDisplayStatus determines which of the two statuses to use when displaying application status in a CAAS model.
{ "resource": "" }
c154562
train
// caasHistoryRewriteDoc determines which status should be stored as history.
{ "resource": "" }
c154563
train
// getStatus retrieves the status document associated with the given // globalKey and converts it to a StatusInfo. If the status document // is not found, a NotFoundError referencing badge will be returned.
{ "resource": "" }
c154564
train
// setStatus inteprets the supplied params as documented on the type.
{ "resource": "" }
c154565
train
// createStatusOp returns the operation needed to create the given status // document associated with the given globalKey.
{ "resource": "" }
c154566
train
// removeStatusOp returns the operation needed to remove the status // document associated with the given globalKey.
{ "resource": "" }
c154567
train
// probablyUpdateStatusHistory inspects existing status-history // and determines if this status is new or the same as the last recorded. // If this is a new status, a new status history record will be added. // If this status is the same as the last status we've received, // we update that record to have a new timesta...
{ "resource": "" }
c154568
train
// eraseStatusHistory removes all status history documents for // the given global key. The documents are removed in batches // to avoid locking the status history collection for extended // periods of time, preventing status history being recorded // for other entities.
{ "resource": "" }
c154569
train
// fetchNStatusResults will return status for the given key filtered with the // given filter or error.
{ "resource": "" }
c154570
train
// NewStorageAPI returns a new storage API facade.
{ "resource": "" }
c154571
train
// NewStorageAPIV5 returns a new storage v5 API facade.
{ "resource": "" }
c154572
train
// NewStorageAPIV4 returns a new storage v4 API facade.
{ "resource": "" }
c154573
train
// NewStorageAPIV3 returns a new storage v3 API facade.
{ "resource": "" }
c154574
train
// StorageDetails retrieves and returns detailed information about desired // storage identified by supplied tags. If specified storage cannot be // retrieved, individual error is returned instead of storage information.
{ "resource": "" }
c154575
train
// ListStorageDetails returns storage matching a filter.
{ "resource": "" }
c154576
train
// ListPools returns a list of pools. // If filter is provided, returned list only contains pools that match // the filter. // Pools can be filtered on names and provider types. // If both names and types are provided as filter, // pools that match either are returned. // This method lists union of pools and environmen...
{ "resource": "" }
c154577
train
// ListVolumes lists volumes with the given filters. Each filter produces // an independent list of volumes, or an error if the filter is invalid // or the volumes could not be listed.
{ "resource": "" }
c154578
train
// ListFilesystems returns a list of filesystems in the environment matching // the provided filter. Each result describes a filesystem in detail, including // the filesystem's attachments.
{ "resource": "" }
c154579
train
// Remove sets the specified storage entities to Dying, unless they are // already Dying or Dead, such that the storage will eventually be removed // from the model. If the arguments specify that the storage should be // destroyed, then the associated cloud storage will be destroyed first; // otherwise it will only be ...
{ "resource": "" }
c154580
train
// DetachStorage sets the specified storage attachments to Dying, unless they are // already Dying or Dead. Any associated, persistent storage will remain // alive. This call can be forced.
{ "resource": "" }
c154581
train
// Detach sets the specified storage attachments to Dying, unless they are // already Dying or Dead. Any associated, persistent storage will remain // alive.
{ "resource": "" }
c154582
train
// Attach attaches existing storage instances to units. // A "CHANGE" block can block this operation.
{ "resource": "" }
c154583
train
// Import imports existing storage into the model. // A "CHANGE" block can block this operation.
{ "resource": "" }
c154584
train
// RemovePool deletes the named pool
{ "resource": "" }
c154585
train
// UpdatePool deletes the named pool
{ "resource": "" }
c154586
train
// Destroy sets the specified storage entities to Dying, unless they are // already Dying or Dead.
{ "resource": "" }
c154587
train
// NewHubWatcher returns a new watcher observing Change events published to the // hub.
{ "resource": "" }
c154588
train
// Watch starts watching the given collection and document id. // An event will be sent onto ch whenever a matching document's txn-revno // field is observed to change after a transaction is applied.
{ "resource": "" }
c154589
train
// UnwatchCollection stops watching the given collection via ch.
{ "resource": "" }
c154590
train
// Report conforms to the worker.Runner.Report interface for returning information about the active worker.
{ "resource": "" }
c154591
train
// queueChange queues up the change for the registered watchers.
{ "resource": "" }
c154592
train
// Validate validates the PrepareParams.
{ "resource": "" }
c154593
train
// PrepareController prepares a new controller based on the provided configuration. // It is an error to prepare a controller if there already exists an // entry in the client store with the same name. // // Upon success, Prepare will update the ClientStore with the details of // the controller, admin account, and admi...
{ "resource": "" }
c154594
train
// decorateAndWriteInfo decorates the info struct with information // from the given cfg, and the writes that out to the filesystem.
{ "resource": "" }
c154595
train
// Send sends the given metrics to the collector service.
{ "resource": "" }
c154596
train
// HasPermission returns true if the specified user has the specified // permission on target.
{ "resource": "" }
c154597
train
// GetPermission returns the permission a user has on the specified target.
{ "resource": "" }
c154598
train
// HasModelAdmin reports whether or not a user has admin access to the // specified model. A user has model access if they are a controller // superuser, or if they have been explicitly granted admin access to the // model.
{ "resource": "" }
c154599
train
// ListResources returns the resource data for the given application ID.
{ "resource": "" }