_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c155600
train
// Manifold returns a manifold whose worker simply provides the central hub. // This hub is a dependency for any other workers that need the hub.
{ "resource": "" }
c155601
train
// HTTPClient implements Connection.APICaller.HTTPClient and returns an HTTP // client pointing to the API server root path.
{ "resource": "" }
c155602
train
// Do implements httprequest.Doer.Do.
{ "resource": "" }
c155603
train
// DoWithBody implements httprequest.DoerWithBody.DoWithBody.
{ "resource": "" }
c155604
train
// encodeMacaroonSlice base64-JSON-encodes a slice of macaroons.
{ "resource": "" }
c155605
train
// unmarshalHTTPErrorResponse unmarshals an error response from // an HTTP endpoint. For historical reasons, these endpoints // return several different incompatible error response formats. // We cope with this by accepting all of the possible formats // and unmarshaling accordingly. // // It always returns a non-nil e...
{ "resource": "" }
c155606
train
// bakeryError translates any discharge-required error into // an error value that the httpbakery package will recognize. // Other errors are returned unchanged.
{ "resource": "" }
c155607
train
// openBlob streams the identified blob from the controller via the // provided HTTP client.
{ "resource": "" }
c155608
train
// Create creates a new service principal using the values specified in params.
{ "resource": "" }
c155609
train
// detectLocalCredentials will use the local server to read and finalize the // cloud credentials.
{ "resource": "" }
c155610
train
// ShouldFinalizeCredential is part of the environs.RequestFinalizeCredential // interface. // This is an optional interface to check if the server certificate has not // been filled in.
{ "resource": "" }
c155611
train
// newStorageAPI creates a new server-side Storage API facade.
{ "resource": "" }
c155612
train
// UnitStorageAttachments returns the IDs of storage attachments for a collection of units.
{ "resource": "" }
c155613
train
// DestroyUnitStorageAttachments marks each storage attachment of the // specified units as Dying.
{ "resource": "" }
c155614
train
// StorageAttachments returns the storage attachments with the specified tags.
{ "resource": "" }
c155615
train
// StorageAttachmentLife returns the lifecycle state of the storage attachments // with the specified tags.
{ "resource": "" }
c155616
train
// WatchUnitStorageAttachments creates watchers for a collection of units, // each of which can be used to watch for lifecycle changes to the corresponding // unit's storage attachments.
{ "resource": "" }
c155617
train
// WatchStorageAttachments creates watchers for a collection of storage // attachments, each of which can be used to watch changes to storage // attachment info.
{ "resource": "" }
c155618
train
// RemoveStorageAttachments removes the specified storage // attachments from state.
{ "resource": "" }
c155619
train
// AddUnitStorage validates and creates additional storage instances for units. // Failures on an individual storage instance do not block remaining // instances from being processed.
{ "resource": "" }
c155620
train
// watchStorageAttachment returns a state.NotifyWatcher that reacts to changes // to the VolumeAttachmentInfo or FilesystemAttachmentInfo corresponding to the // tags specified.
{ "resource": "" }
c155621
train
// ensureJujudPasswordHelper actually does the heavy lifting of changing the password. It checks the registry for a password. If it doesn't exist // then it writes a new one to the registry, changes the password for the local jujud user and sets the password for all it's services.
{ "resource": "" }
c155622
train
// changeUserPasswordLocalhost changes the password for username on localhost
{ "resource": "" }
c155623
train
// List returns blocks that are switched on for current model.
{ "resource": "" }
c155624
train
// SwitchBlockOn switches desired block on for the current model. // Valid block types are "BlockDestroy", "BlockRemove" and "BlockChange".
{ "resource": "" }
c155625
train
// Bootstrap creates a new instance, chosing the series and arch out of // available tools. The series and arch are returned along with a func // that must be called to finalize the bootstrap process by transferring // the tools and installing the initial juju controller.
{ "resource": "" }
c155626
train
// RegionInstanceTypes returns the instance types for the named region.
{ "resource": "" }
c155627
train
// newStorageIdValue returns a gnuflag.Value for convenient parsing of storage // ids in ctx.
{ "resource": "" }
c155628
train
// String returns the current value.
{ "resource": "" }
c155629
train
// Set interprets value as a storage id, if possible, and returns an error // if it is not known to the system. The parsed storage id will be written // to v.result.
{ "resource": "" }
c155630
train
// NewStateAuthenticator returns a new LocalMacaroonAuthenticator that // authenticates users and agents using the given state pool. The // authenticator will register handlers into the mux for dealing with // local macaroon logins.
{ "resource": "" }
c155631
train
// NewToolsGetter returns a new ToolsGetter. The GetAuthFunc will be // used on each invocation of Tools to determine current permissions.
{ "resource": "" }
c155632
train
// NewToolsSetter returns a new ToolsGetter. The GetAuthFunc will be // used on each invocation of Tools to determine current permissions.
{ "resource": "" }
c155633
train
// SetTools updates the recorded tools version for the agents.
{ "resource": "" }
c155634
train
// NewToolsFinder returns a new ToolsFinder, returning tools // with their URLs pointing at the API server.
{ "resource": "" }
c155635
train
// findTools calls findMatchingTools and then rewrites the URLs // using the provided ToolsURLGetter.
{ "resource": "" }
c155636
train
// matchingStorageTools returns a coretools.List, with an entry for each // metadata entry in the tools storage that matches the given parameters.
{ "resource": "" }
c155637
train
// ToolsURL returns a tools URL pointing the API server // specified by the "serverRoot".
{ "resource": "" }
c155638
train
// OpenResource opens the identified resource using the provided client.
{ "resource": "" }
c155639
train
// getToolsForRequest retrieves the compressed agent binaries tarball from state // based on the input HTTP request. // It is returned with the size of the file as recorded in the stored metadata.
{ "resource": "" }
c155640
train
// fetchAndCacheTools fetches tools with the specified version by searching for a URL // in simplestreams and GETting it, caching the result in tools storage before returning // to the caller.
{ "resource": "" }
c155641
train
// sendTools streams the tools tarball to the client.
{ "resource": "" }
c155642
train
// processPost handles a tools upload POST request after authentication.
{ "resource": "" }
c155643
train
// handleUpload uploads the tools data from the reader to env storage as the specified version.
{ "resource": "" }
c155644
train
// ModelManifold returns a dependency.Manifold that runs a storage provisioner.
{ "resource": "" }
c155645
train
// NetAddr returns the host-port as an address // suitable for calling net.Dial.
{ "resource": "" }
c155646
train
// Less reports whether hp1 is ordered before hp2 // according to the criteria used by SortHostPorts.
{ "resource": "" }
c155647
train
// AddressesWithPort returns the given addresses all // associated with the given port.
{ "resource": "" }
c155648
train
// NewHostPorts creates a list of HostPorts from each given string // address and port.
{ "resource": "" }
c155649
train
// ParseHostPort converts a string containing a single host and port // value to a HostPort.
{ "resource": "" }
c155650
train
// HostsWithoutPort strips the port from each HostPort, returning just // the addresses.
{ "resource": "" }
c155651
train
// CollapseHostPorts returns a flattened list of HostPorts keeping the // same order they appear in serversHostPorts.
{ "resource": "" }
c155652
train
// EnsureFirstHostPort scans the given list of HostPorts and if // "first" is found, it moved to index 0. Otherwise, if "first" is not // in the list, it's inserted at index 0.
{ "resource": "" }
c155653
train
// UniqueHostPorts returns the given hostPorts after filtering out any // duplicates, preserving the input order.
{ "resource": "" }
c155654
train
// NewActionGetCommand returns an ActionGetCommand for use with the given // context.
{ "resource": "" }
c155655
train
// Init makes sure there are no additional unknown arguments to action-get.
{ "resource": "" }
c155656
train
// Run recurses into the params map for the Action, given the list of keys // into the map, and returns either the keyed value, or nothing. // In the case of an empty keys list, the entire params map will be returned.
{ "resource": "" }
c155657
train
// NewClient creates a new client-side RemoteRelations facade.
{ "resource": "" }
c155658
train
// ImportRemoteEntity adds an entity to the remote entities collection // with the specified opaque token.
{ "resource": "" }
c155659
train
// GetToken returns the token associated with the entity with the given tag for the specified model.
{ "resource": "" }
c155660
train
// SaveMacaroon saves the macaroon for the entity.
{ "resource": "" }
c155661
train
// WatchRemoteApplicationRelations returns remote relations watchers that delivers // changes according to the addition, removal, and lifecycle changes of // relations that the specified remote application is involved in; and also // according to the entering, departing, and change of unit settings in // those relation...
{ "resource": "" }
c155662
train
// WatchLocalRelationUnits returns a watcher that notifies of changes to the // local units in the relation with the given key.
{ "resource": "" }
c155663
train
// SetRemoteApplicationStatus sets the status for the specified remote application.
{ "resource": "" }
c155664
train
// StartDownload starts a new download as specified by `req` using // `openBlob` to actually pull the remote data.
{ "resource": "" }
c155665
train
// createCloudOp returns a txn.Op that will initialize // the cloud definition for the controller.
{ "resource": "" }
c155666
train
// updateCloudOp returns a txn.Op that will update // an existing cloud definition for the controller.
{ "resource": "" }
c155667
train
// incApplicationOffersRefOp returns a txn.Op that increments the reference // count for a cloud model.
{ "resource": "" }
c155668
train
// countCloudModelRefOp returns the number of models for a cloud, // along with a txn.Op that ensures that that does not change.
{ "resource": "" }
c155669
train
// decCloudModelRefOp returns a txn.Op that decrements the reference // count for a cloud model.
{ "resource": "" }
c155670
train
// Clouds returns the definitions for all clouds in the controller.
{ "resource": "" }
c155671
train
// Cloud returns the controller's cloud definition.
{ "resource": "" }
c155672
train
// AddCloud creates a cloud with the given name and details. // Note that the Config is deliberately ignored - it's only // relevant when bootstrapping.
{ "resource": "" }
c155673
train
// UpdateCloud updates an existing cloud with the given name and details. // Note that the Config is deliberately ignored - it's only // relevant when bootstrapping.
{ "resource": "" }
c155674
train
// validateCloud checks that the supplied cloud is valid.
{ "resource": "" }
c155675
train
// RemoveCloud removes a cloud and any credentials for that cloud. // If the cloud is in use, ie has models deployed to it, the operation fails.
{ "resource": "" }
c155676
train
// removeCloudOp returns a list of txn.Ops that will remove // the specified cloud and any associated credentials.
{ "resource": "" }
c155677
train
// NewWorker returns a worker that keeps track of // the machines in the state and polls their instance // addresses and status periodically to keep them up to date.
{ "resource": "" }
c155678
train
// getMachine is part of the machineContext interface.
{ "resource": "" }
c155679
train
// instanceInfo is part of the machineContext interface.
{ "resource": "" }
c155680
train
// stateStepsFor236 returns upgrade steps for Juju 2.3.6 that manipulate state directly.
{ "resource": "" }
c155681
train
// ControllerConfig returns the current controller configuration.
{ "resource": "" }
c155682
train
// WatchForModelConfigChanges return a NotifyWatcher waiting for the // model configuration to change.
{ "resource": "" }
c155683
train
// ModelConfig returns the current model configuration.
{ "resource": "" }
c155684
train
// LogForwardConfig returns the current log forward syslog configuration.
{ "resource": "" }
c155685
train
// UpdateStatusHookInterval returns the current update status hook interval.
{ "resource": "" }
c155686
train
// AddMachineInsideNewMachine creates a new machine within a container // of the given type inside another new machine. The two given templates // specify the form of the child and parent respectively.
{ "resource": "" }
c155687
train
// AddMachineInsideMachine adds a machine inside a container of the // given type on the existing machine with id=parentId.
{ "resource": "" }
c155688
train
// AddMachine adds a machine with the given series and jobs. // It is deprecated and around for testing purposes only.
{ "resource": "" }
c155689
train
// AddOneMachine machine adds a new machine configured according to the // given template.
{ "resource": "" }
c155690
train
// AddMachines adds new machines configured according to the // given templates.
{ "resource": "" }
c155691
train
// effectiveMachineTemplate verifies that the given template is // valid and combines it with values from the state // to produce a resulting template that more accurately // represents the data that will be inserted into the state.
{ "resource": "" }
c155692
train
// addMachineOps returns operations to add a new top level machine // based on the given template. It also returns the machine document // that will be inserted.
{ "resource": "" }
c155693
train
// supportsContainerType reports whether the machine supports the given // container type. If the machine's supportedContainers attribute is // set, this decision can be made right here, otherwise we assume that // everything will be ok and later on put the container into an error // state if necessary.
{ "resource": "" }
c155694
train
// addMachineInsideMachineOps returns operations to add a machine inside // a container of the given type on an existing machine.
{ "resource": "" }
c155695
train
// newContainerId returns a new id for a machine within the machine // with id parentId and the given container type.
{ "resource": "" }
c155696
train
// addMachineInsideNewMachineOps returns operations to create a new // machine within a container of the given type inside another // new machine. The two given templates specify the form // of the child and parent respectively.
{ "resource": "" }
c155697
train
// insertNewMachineOps returns operations to insert the given machine document // into the database, based on the given template. Only the constraints are // taken from the template.
{ "resource": "" }
c155698
train
// NewClient returns a Client that is backed by a storage.Client created with // storage.NewClient
{ "resource": "" }
c155699
train
// GetContainerReference is part of the BlobStorageClient interface.
{ "resource": "" }