_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c4300
train
// DestroyMachine destroys the virtual machine represented by the kvmContainer.
{ "resource": "" }
c4301
train
// AutostartMachine indicates that the virtual machines should automatically // restart when the host restarts.
{ "resource": "" }
c4302
train
// guestPath returns the path to the guest directory from the given // pathfinder.
{ "resource": "" }
c4303
train
// writeDataSourceVolume creates a data source image for cloud init.
{ "resource": "" }
c4304
train
// writeDomainXML writes out the configuration required to create a new guest // domain.
{ "resource": "" }
c4305
train
// NewAPI creates a new Subnets API server-side facade with a // state.State backing.
{ "resource": "" }
c4306
train
// AllSpaces is defined on the API interface.
{ "resource": "" }
c4307
train
// AddSubnets is defined on the API interface.
{ "resource": "" }
c4308
train
// NewLeaderGetCommand returns a new leaderGetCommand with the given context.
{ "resource": "" }
c4309
train
// PersonalCloudMetadata loads any personal cloud metadata defined // in the Juju Home directory. If not cloud metadata is found, // that is not an error; nil is returned.
{ "resource": "" }
c4310
train
// ParseCloudMetadataFile loads any cloud metadata defined // in the specified file.
{ "resource": "" }
c4311
train
// WritePersonalCloudMetadata marshals to YAML and writes the cloud metadata // to the personal cloud file.
{ "resource": "" }
c4312
train
// inferContainerSpaces tries to find a valid space for the container to be // on. This should only be used when the container itself doesn't have any // valid constraints on what spaces it should be in. // If ContainerNetworkingMethod is 'local' we fall back to "" and use lxdbr0. // If this machine is in a single spac...
{ "resource": "" }
c4313
train
// determineContainerSpaces tries to use the direct information about a // container to find what spaces it should be in, and then falls back to what // we know about the host machine.
{ "resource": "" }
c4314
train
// findSpacesAndDevicesForContainer looks up what spaces the container wants // to be in, and what spaces the host machine is already in, and tries to // find the devices on the host that are useful for the container.
{ "resource": "" }
c4315
train
// Manifold defines a simple start function which // runs after the API connection has come up. If the machine agent is // a controller, it grabs the state serving info over the API and // records it to agent configuration, and then stops.
{ "resource": "" }
c4316
train
// formatPoolListTabular returns a tabular summary of pool instances or // errors out if parameter is not a map of PoolInfo.
{ "resource": "" }
c4317
train
// formatPoolsTabular returns a tabular summary of pool instances.
{ "resource": "" }
c4318
train
// IsAuthorisationFailure determines whether the given error indicates // that the vsphere credential used is bad.
{ "resource": "" }
c4319
train
// ProcessDyingModel checks if the model is Dying and empty, and if so, // transitions the model to Dead. // // If the model is non-empty because it is the controller model and still // contains hosted models, an error satisfying IsHasHostedModelsError will // be returned. If the model is otherwise non-empty, an error ...
{ "resource": "" }
c4320
train
// NewMetricsDebugAPI creates a new API endpoint for calling metrics debug functions.
{ "resource": "" }
c4321
train
// GetMetrics returns all metrics stored by the state server.
{ "resource": "" }
c4322
train
// SetMeterStatus sets meter statuses for entities.
{ "resource": "" }
c4323
train
// NewPasswordChanger returns a new PasswordChanger. The GetAuthFunc will be // used on each invocation of SetPasswords to determine current permissions.
{ "resource": "" }
c4324
train
// SetPasswords sets the given password for each supplied entity, if possible.
{ "resource": "" }
c4325
train
// NewAddCAASCommand returns a command to add caas information.
{ "resource": "" }
c4326
train
// getStdinPipe returns nil if the context's stdin is not a pipe.
{ "resource": "" }
c4327
train
// NewUnitsWatcher returns a new UnitsWatcher. The GetAuthFunc will be // used on each invocation of WatchUnits to determine current // permissions.
{ "resource": "" }
c4328
train
// PreUpgradeSteps runs various checks and prepares for performing an upgrade. // If any check fails, an error is returned which aborts the upgrade.
{ "resource": "" }
c4329
train
// CheckFreeDiskSpace returns a helpful error if there isn't at // least thresholdMib MiB of free space available on the volume // containing dir.
{ "resource": "" }
c4330
train
// ValidateState verifies the state passed in is a valid okayState.
{ "resource": "" }
c4331
train
// NewAPI creates a new instance of the Backups API facade.
{ "resource": "" }
c4332
train
// CreateResult updates the result with the information in the // metadata value.
{ "resource": "" }
c4333
train
// NewInstanceMutaterAPI creates a new API server endpoint for managing // charm profiles on juju lxd machines and containers.
{ "resource": "" }
c4334
train
// CharmProfilingInfo returns info to update lxd profiles on the machine. If // the machine is not provisioned, no profile change info will be returned, // nor will an error.
{ "resource": "" }
c4335
train
// SetCharmProfiles records the given slice of charm profile names.
{ "resource": "" }
c4336
train
// WatchMachines starts a watcher to track machines. // WatchMachines does not consume the initial event of the watch response, as // that returns the initial set of machines that are currently available.
{ "resource": "" }
c4337
train
// WatchContainers starts a watcher to track Containers on a given // machine.
{ "resource": "" }
c4338
train
// WatchLXDProfileVerificationNeeded starts a watcher to track Applications with // LXD Profiles.
{ "resource": "" }
c4339
train
// newTimedStatusUpdater returns a function which waits a given period of time // before querying the apiserver for updated data.
{ "resource": "" }
c4340
train
// MakeCloudSpecGetter returns a function which returns a CloudSpec // for a given model, using the given Pool.
{ "resource": "" }
c4341
train
// MakeCloudSpecGetterForModel returns a function which returns a // CloudSpec for a single model. Attempts to request a CloudSpec for // any other model other than the one associated with the given // state.State results in an error.
{ "resource": "" }
c4342
train
// MakeCloudSpecWatcherForModel returns a function which returns a // NotifyWatcher for cloud spec changes for a single model. // Attempts to request a watcher for any other model other than the // one associated with the given state.State results in an error.
{ "resource": "" }
c4343
train
// ValidateUpgradeSeriesStatus validates a the input status as valid for a // unit, returning the valid status or an error.
{ "resource": "" }
c4344
train
// CompareUpgradeSeriesStatus compares two upgrade series statuses and returns // an integer; if the first argument equals the second then 0 is returned; if // the second is greater -1 is returned; 1 is returned otherwise. An error is // returned if either argument is an invalid status.
{ "resource": "" }
c4345
train
// NewAuthenticator returns a new Authenticator using the given StatePool.
{ "resource": "" }
c4346
train
// Maintain periodically expires local login interactions.
{ "resource": "" }
c4347
train
// CreateLocalLoginMacaroon is part of the // httpcontext.LocalMacaroonAuthenticator interface.
{ "resource": "" }
c4348
train
// AddHandlers adds the handlers to the given mux for handling local // macaroon logins.
{ "resource": "" }
c4349
train
// Authenticate is part of the httpcontext.Authenticator interface.
{ "resource": "" }
c4350
train
// mibToGB converts the value in MiB to GB. // Juju works in MiB, MAAS expects GB.
{ "resource": "" }
c4351
train
// buildMAASVolumeParameters creates the MAAS volume information to include // in a request to acquire a MAAS node, based on the supplied storage parameters.
{ "resource": "" }
c4352
train
// One gets the identified document from the collection.
{ "resource": "" }
c4353
train
// All gets all documents from the collection matching the query.
{ "resource": "" }
c4354
train
// Run runs the transaction produced by the provided factory function.
{ "resource": "" }
c4355
train
// NewStorage returns a new blob storage for the model.
{ "resource": "" }
c4356
train
// ApplicationExistsOps returns the operations that verify that the // identified application exists.
{ "resource": "" }
c4357
train
// ClientStore implements the ModelCommand interface.
{ "resource": "" }
c4358
train
// SetModelName implements the ModelCommand interface.
{ "resource": "" }
c4359
train
// ModelName implements the ModelCommand interface.
{ "resource": "" }
c4360
train
// ModelType implements the ModelCommand interface.
{ "resource": "" }
c4361
train
// SetModelGeneration implements the ModelCommand interface.
{ "resource": "" }
c4362
train
// ActiveBranch implements the ModelCommand interface.
{ "resource": "" }
c4363
train
// ControllerName implements the ModelCommand interface.
{ "resource": "" }
c4364
train
// NewAPIRoot returns a new connection to the API server for the environment // directed to the model specified on the command line.
{ "resource": "" }
c4365
train
// newAPIRoot is the internal implementation of NewAPIRoot and NewControllerAPIRoot; // if modelName is empty, it makes a controller-only connection.
{ "resource": "" }
c4366
train
// Wrap wraps the specified ModelCommand, returning a ModelCommand // that proxies to each of the ModelCommand methods. // Any provided options are applied to the wrapped command // before it is returned.
{ "resource": "" }
c4367
train
// validateCommandForModelType returns an error if an IAAS-only command // is run on a CAAS model.
{ "resource": "" }
c4368
train
// BootstrapContext returns a new BootstrapContext constructed from a command Context.
{ "resource": "" }
c4369
train
// BootstrapContextNoVerify returns a new BootstrapContext constructed from a command Context // where the validation of credentials is false.
{ "resource": "" }
c4370
train
// SplitModelName splits a model name into its controller // and model parts. If the model is unqualified, then the // returned controller string will be empty, and the returned // model string will be identical to the input.
{ "resource": "" }
c4371
train
// vmExtension creates a CustomScript VM extension for the given VM // which will execute the CustomData on the machine as a script.
{ "resource": "" }
c4372
train
// NewUpgradeCharmCommand returns a command which upgrades application's charm.
{ "resource": "" }
c4373
train
// addCharm interprets the new charmRef and adds the specified charm if // the new charm is different to what's already deployed as specified by // oldURL.
{ "resource": "" }
c4374
train
// FormatOneline writes a brief list of units and their subordinates. // Subordinates will be indented 2 spaces and listed under their // superiors. This format works with version 2 of the CLI.
{ "resource": "" }
c4375
train
// EnsureCachedImage ensures that a container image suitable for satisfying // the input start parameters has been cached on disk.
{ "resource": "" }
c4376
train
// Start creates and starts a new container. // It assumes that the backing image is already cached on disk.
{ "resource": "" }
c4377
train
// InstanceAvailabilityzoneNames is defined in the common.ZonedEnviron interface
{ "resource": "" }
c4378
train
// NewOracleEnviron returns a new OracleEnviron
{ "resource": "" }
c4379
train
// buildSpacesMap builds a map with juju converted names from provider space names // // shamelessly copied from the MAAS provider
{ "resource": "" }
c4380
train
// StopInstances is part of the InstanceBroker interface.
{ "resource": "" }
c4381
train
// getOracleInstances attempts to fetch information from the oracle API for the // specified IDs.
{ "resource": "" }
c4382
train
// AllInstances is part of the InstanceBroker interface.
{ "resource": "" }
c4383
train
// MaintainInstance is part of the InstanceBroker interface.
{ "resource": "" }
c4384
train
// Config is part of the Environ interface.
{ "resource": "" }
c4385
train
// ConstraintsValidator is part of the environs.Environ interface.
{ "resource": "" }
c4386
train
// DestroyController is part of the environs.Environ interface.
{ "resource": "" }
c4387
train
// InstanceTypes is part of the environs.InstanceTypesFetcher interface.
{ "resource": "" }
c4388
train
// createInstance creates a new instance inside the oracle infrastructure
{ "resource": "" }
c4389
train
// IsAvailabilityZoneIndependent reports whether or not the given error, // or its cause, is independent of any particular availability zone. // Juju uses this to decide whether or not to attempt the failed operation // in another availability zone; zone-independent failures will not be // reattempted. // // If the err...
{ "resource": "" }
c4390
train
// OSDependentEnvVars returns the OS-dependent environment variables that // should be set for a hook context.
{ "resource": "" }
c4391
train
// windowsEnv adds windows specific environment variables. PSModulePath // helps hooks use normal imports instead of dot sourcing modules // its a convenience variable. The PATH variable delimiter is // a semicolon instead of a colon
{ "resource": "" }
c4392
train
// stateStepsFor223 returns upgrade steps for Juju 2.2.3 that manipulate state directly.
{ "resource": "" }
c4393
train
// DestroyController destroys the controller. // // The v3 implementation of DestroyController ignores the DestroyStorage // field of the arguments, and unconditionally destroys all storage in // the controller. // // See ControllerAPIv4.DestroyController for more details.
{ "resource": "" }
c4394
train
// DestroyController destroys the controller. // // If the args specify the destruction of the models, this method will // attempt to do so. Otherwise, if the controller has any non-empty, // non-Dead hosted models, then an error with the code // params.CodeHasHostedModels will be transmitted.
{ "resource": "" }
c4395
train
// Resource2API converts a resource.Resource into // a Resource struct.
{ "resource": "" }
c4396
train
// APIResult2ApplicationResources converts a ResourcesResult into a resource.ApplicationResources.
{ "resource": "" }
c4397
train
// API2Resource converts an API Resource struct into // a resource.Resource.
{ "resource": "" }
c4398
train
// CharmResource2API converts a charm resource into // a CharmResource struct.
{ "resource": "" }
c4399
train
// API2CharmResource converts an API CharmResource struct into // a charm resource.
{ "resource": "" }