_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c154800
train
// NewFacadeV4 creates a new server-side MachineManager API facade.
{ "resource": "" }
c154801
train
// NewFacadeV5 creates a new server-side MachineManager API facade.
{ "resource": "" }
c154802
train
// NewFacadeV6 creates a new server-side MachineManager API facade.
{ "resource": "" }
c154803
train
// NewMachineManagerAPI creates a new server-side MachineManager API facade.
{ "resource": "" }
c154804
train
// DestroyMachine removes a set of machines from the model.
{ "resource": "" }
c154805
train
// DestroyMachineWithParams removes a set of machines from the model. // v5 and prior versions did not support MaxWait.
{ "resource": "" }
c154806
train
// DestroyMachineWithParams removes a set of machines from the model.
{ "resource": "" }
c154807
train
// UpgradeSeriesValidate validates that the incoming arguments correspond to a // valid series upgrade for the target machine. // If they do, a list of the machine's current units is returned for use in // soliciting user confirmation of the command.
{ "resource": "" }
c154808
train
// UpgradeSeriesPrepare prepares a machine for a OS series upgrade.
{ "resource": "" }
c154809
train
// UpgradeSeriesComplete marks a machine as having completed a managed series upgrade.
{ "resource": "" }
c154810
train
// WatchUpgradeSeriesNotifications returns a watcher that fires on upgrade series events.
{ "resource": "" }
c154811
train
// GetUpgradeSeriesMessages returns all new messages associated with upgrade // series events. Messages that have already been retrieved once are not // returned by this method.
{ "resource": "" }
c154812
train
// verifiedUnits verifies that the machine units and their tree of subordinates // all support the input series. If not, an error is returned. // If they do, the agent statuses are checked to ensure that they are all in // the idle state i.e. not installing, running hooks, or needing intervention. // the final check is...
{ "resource": "" }
c154813
train
// isSeriesLessThan returns a bool indicating whether the first argument's // version is lexicographically less than the second argument's, thus indicating // that the series represents an older version of the operating system. The // output is only valid for Ubuntu series.
{ "resource": "" }
c154814
train
// ClientScript returns a bash script suitable for executing // on the unit system to intercept matching hooks or actions via tmux shell.
{ "resource": "" }
c154815
train
// Manifold returns a manifold that starts a worker proxying the supplied Agent // for use by other workers.
{ "resource": "" }
c154816
train
// startFunc returns a StartFunc that starts a worker holding a reference to // the supplied Agent.
{ "resource": "" }
c154817
train
// New returns a new notify watch handler that will convert the given machine & // agent to a controller.
{ "resource": "" }
c154818
train
// SetUp implements NotifyWatchHandler's SetUp method. It returns a watcher that // checks for changes to the current machine.
{ "resource": "" }
c154819
train
// Handle implements NotifyWatchHandler's Handle method. If the change means // that the machine is now expected to manage the environment, // we throw a fatal error to instigate agent restart.
{ "resource": "" }
c154820
train
// NewState returns a version of the state that provides functionality // required by the reboot worker.
{ "resource": "" }
c154821
train
// WatchForRebootEvent implements State.WatchForRebootEvent
{ "resource": "" }
c154822
train
// RequestReboot implements State.RequestReboot
{ "resource": "" }
c154823
train
// GetRebootAction implements State.GetRebootAction
{ "resource": "" }
c154824
train
// IsFortressError returns true if the error provided is fortress related.
{ "resource": "" }
c154825
train
// bestVersion tries to find the newest version in the version list that we can // use.
{ "resource": "" }
c154826
train
// NewLeadershipSettingsAccessor creates a new // LeadershipSettingsAccessor.
{ "resource": "" }
c154827
train
// Merge merges in the provided leadership settings. Only leaders for // the given service may perform this operation.
{ "resource": "" }
c154828
train
// Read reads leadership settings for the provided service ID. Any // unit of the service may perform this operation.
{ "resource": "" }
c154829
train
// WatchLeadershipSettings will block the caller until leadership settings // for the given service ID change.
{ "resource": "" }
c154830
train
// List implements the API method.
{ "resource": "" }
c154831
train
// NewUploadCommand returns a new command that lists resources defined // by a charm.
{ "resource": "" }
c154832
train
// Info implements cmd.Command.Info
{ "resource": "" }
c154833
train
// addResourceValue parses the given arg into a name and a resource value, // and saves it in c.resourceValue.
{ "resource": "" }
c154834
train
// upload opens the given file and calls the apiclient to upload it to the given // application with the given name.
{ "resource": "" }
c154835
train
// ensureFileHandler decorates the given function to ensure the Juju GUI files // are available on disk.
{ "resource": "" }
c154836
train
// ensureFiles checks that the GUI files are available on disk. // If they are not, it means this is the first time this Juju GUI version is // accessed. In this case, retrieve the Juju GUI archive from the storage and // uncompress it to disk. This function returns the current GUI root directory // and archive hash.
{ "resource": "" }
c154837
train
// guiVersionAndHash returns the version and the SHA256 hash of the current // Juju GUI archive.
{ "resource": "" }
c154838
train
// uncompressGUI uncompresses the tar.bz2 Juju GUI archive provided in r. // The sourceDir directory included in the tar archive is copied to targetDir.
{ "resource": "" }
c154839
train
// serveStatic serves the GUI static files.
{ "resource": "" }
c154840
train
// serveCombo serves the GUI JavaScript and CSS files, dynamically combined.
{ "resource": "" }
c154841
train
// serveIndex serves the GUI index file.
{ "resource": "" }
c154842
train
// getConfigPath returns the appropriate GUI config path for the given request // path.
{ "resource": "" }
c154843
train
// uuidFromPath checks whether the given path includes a fragment with a // valid model UUID. An empty string is returned if the model is not found.
{ "resource": "" }
c154844
train
// isNewGUI reports whether the version of the current GUI is >= 2.3.0.
{ "resource": "" }
c154845
train
// serveConfig serves the Juju GUI JavaScript configuration file.
{ "resource": "" }
c154846
train
// handleGet returns information on Juju GUI archives in the controller.
{ "resource": "" }
c154847
train
// handlePost is used to upload new Juju GUI archives to the controller.
{ "resource": "" }
c154848
train
// handlePut is used to switch to a specific Juju GUI version.
{ "resource": "" }
c154849
train
// newConnection opens a new low-level connection to the GCE API using // the Auth's data and returns it. This includes building the // OAuth-wrapping network transport.
{ "resource": "" }
c154850
train
// SetObservedNetworkConfig reads the network config for the machine identified // by the input args. This config is merged with the new network config supplied // in the same args and updated if it has changed.
{ "resource": "" }
c154851
train
// SetProviderNetworkConfig sets the provider supplied network configuration // contained in the input args against each machine supplied with said args.
{ "resource": "" }
c154852
train
// NewPingBatcher creates a worker that will batch ping requests and prepare them // for insertion into the Pings collection. Pass in the base "presence" collection. // flushInterval is how often we will write the contents to the database. // It should be shorter than the 30s slot window for us to not cause active // p...
{ "resource": "" }
c154853
train
// NewDeadPingBatcher returns a PingBatcher that is already stopped with an error.
{ "resource": "" }
c154854
train
// Start the worker loop.
{ "resource": "" }
c154855
train
// Stop this PingBatcher, part of the extended Worker interface.
{ "resource": "" }
c154856
train
// nextSleep determines how long we should wait before flushing our state to the database. // We use a range of time around the requested 'flushInterval', so that we avoid having // all requests to the database happen at exactly the same time across machines.
{ "resource": "" }
c154857
train
// Sync schedules a flush of the current state to the database. // This is not immediate, but actually within a short timeout so that many calls // to sync in a short time frame will only trigger one write to the database.
{ "resource": "" }
c154858
train
// handlePing is where we actually update our internal structures after we // get a ping request.
{ "resource": "" }
c154859
train
// flush pushes the internal state to the database. Note that if the database // updates fail, we will still wipe our internal state as it is unsafe to // publish the same updates to the same slots.
{ "resource": "" }
c154860
train
// NewShowControllerCommand returns a command to show details of the desired controllers.
{ "resource": "" }
c154861
train
// RegisterToolsDataSourceFunc registers an ToolsDataSourceFunc // with the specified id, overwriting any function previously registered // with the same id.
{ "resource": "" }
c154862
train
// UnregisterToolsDataSourceFunc unregisters an ToolsDataSourceFunc // with the specified id.
{ "resource": "" }
c154863
train
// GetMetadataSources returns the sources to use when looking for // simplestreams tools metadata for the given stream.
{ "resource": "" }
c154864
train
// environmentDataSources returns simplestreams datasources for the environment // by calling the functions registered in RegisterToolsDataSourceFunc. // The datasources returned will be in the same order the functions were registered.
{ "resource": "" }
c154865
train
// New creates a new client-side ExternalControllerUpdater facade.
{ "resource": "" }
c154866
train
// WatchExternalControllers watches for the addition and removal of external // controllers.
{ "resource": "" }
c154867
train
// ExternalControllerInfo returns the info for the external controller with the specified UUID.
{ "resource": "" }
c154868
train
// SetExternalControllerInfo saves the given controller info.
{ "resource": "" }
c154869
train
// WithAuthorization is part of the autorest.Authorizer interface.
{ "resource": "" }
c154870
train
// AuthToken returns a service principal token, suitable for authorizing // Resource Manager API requests, based on the supplied CloudSpec.
{ "resource": "" }
c154871
train
// Upload sends the backup archive to remote storage.
{ "resource": "" }
c154872
train
// NewReachableChecker creates a ReachableChecker that can be used to check for // Hosts that are viable SSH targets. // When FindHost is called, we will dial the entries in the given hostPorts, in // parallel, using the given dialer, closing successfully established // connections after checking the ssh key. Individua...
{ "resource": "" }
c154873
train
// Check initiates a connection to HostPort and tries to do an SSH key // exchange to determine the preferred public key of the remote host. // It then checks if that key is in the accepted set of keys.
{ "resource": "" }
c154874
train
// FindHost takes a list of possible host+port combinations and possible public // keys that the SSH server could be using. We make an attempt to connect to // each of those addresses and do an SSH handshake negotiation. We then check // if the SSH server's negotiated public key is in our allowed set. The first // addr...
{ "resource": "" }
c154875
train
// NewAttachments returns a new Attachments.
{ "resource": "" }
c154876
train
// init processes the storage state directory and creates storagers // for the state files found.
{ "resource": "" }
c154877
train
// SetDying ensures that any unprovisioned storage attachments are removed // from state.
{ "resource": "" }
c154878
train
// Storage returns the ContextStorage with the supplied tag if it was // found, and whether it was found.
{ "resource": "" }
c154879
train
// StorageTags returns the names.StorageTags for the active storage attachments.
{ "resource": "" }
c154880
train
// ValidateHook validates the hook against the current state.
{ "resource": "" }
c154881
train
// CommitHook persists the state change encoded in the supplied storage // hook, or returns an error if the hook is invalid given current state.
{ "resource": "" }
c154882
train
// UnmarshalInfo attempts to unmarshal the information contained in the Info // field of a RequestError into an object instance a pointer to which is passed // via the to argument. The method will return an error if a non-pointer arg // is provided.
{ "resource": "" }
c154883
train
// Call invokes the named action on the object of the given type with the given // id. The returned values will be stored in response, which should be a pointer. // If the action fails remotely, the error will have a cause of type RequestError. // The params value may be nil if no parameters are provided; the response ...
{ "resource": "" }
c154884
train
// InvalidateModelCredential invalidate cloud credential for the model // of the given state.
{ "resource": "" }
c154885
train
// ValidateCloudCredential validates new cloud credential for this model.
{ "resource": "" }
c154886
train
// SetCloudCredential sets new cloud credential for this model. // Returned bool indicates if model credential was set.
{ "resource": "" }
c154887
train
// WatchModelCredential returns a new NotifyWatcher that watches // a model reference to a cloud credential.
{ "resource": "" }
c154888
train
// OpenMessageWriter returns a new message writer interface value which must // be closed when finished with.
{ "resource": "" }
c154889
train
// NewSchedule constructs a new schedule, using the given Clock for the Next // method.
{ "resource": "" }
c154890
train
// Next returns a channel which will send after the next scheduled item's time // has been reached. If there are no scheduled items, nil is returned.
{ "resource": "" }
c154891
train
// Ready returns the parameters for items that are scheduled at or before // "now", and removes them from the schedule. The resulting slices are in // order of time; items scheduled for the same time have no defined relative // order.
{ "resource": "" }
c154892
train
// Add adds an item with the specified value, with the corresponding key // and time to the schedule. Add will panic if there already exists an item // with the same key.
{ "resource": "" }
c154893
train
// Remove removes the item corresponding to the specified key from the // schedule. If no item with the specified key exists, this is a no-op.
{ "resource": "" }
c154894
train
// RequestReboot sets the reboot flag on the provided machines
{ "resource": "" }
c154895
train
// Validate validates the OpenParams.
{ "resource": "" }
c154896
train
// OpenController connects to the server with the given parameters, waits for it // to be initialized, and returns a new Controller instance. // // OpenController returns unauthorizedError if access is unauthorized.
{ "resource": "" }
c154897
train
// Open connects to the server with the given parameters, waits for it // to be initialized, and returns a new State representing the model // connected to. // // Open returns unauthorizedError if access is unauthorized.
{ "resource": "" }
c154898
train
// NewMockProfileMachine creates a new mock instance
{ "resource": "" }
c154899
train
// UpgradeCharmProfileCharmURL mocks base method
{ "resource": "" }