_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c155500
train
// seen states that a Multiwatcher has just been given information about // all entities newer than the given revno. We assume it has already // seen all the older entities.
{ "resource": "" }
c155501
train
// leave is called when the given watcher leaves. It decrements the reference // counts of any entities that have been seen by the watcher.
{ "resource": "" }
c155502
train
// newStore returns an Store instance holding information about the // current state of all entities in the model. // It is only exposed here for testing purposes.
{ "resource": "" }
c155503
train
// All returns all the entities stored in the Store, // oldest first. It is only exposed for testing purposes.
{ "resource": "" }
c155504
train
// add adds a new entity with the given id and associated // information to the list.
{ "resource": "" }
c155505
train
// decRef decrements the reference count of an entry within the list, // deleting it if it becomes zero and the entry is removed.
{ "resource": "" }
c155506
train
// delete deletes the entry with the given info id.
{ "resource": "" }
c155507
train
// Remove marks that the entity with the given id has // been removed from the backing. If nothing has seen the // entity, then we delete it immediately.
{ "resource": "" }
c155508
train
// Update updates the information for the given entity.
{ "resource": "" }
c155509
train
// Get returns the stored entity with the given id, or nil if none was found. // The contents of the returned entity MUST not be changed.
{ "resource": "" }
c155510
train
// ChangesSince returns any changes that have occurred since // the given revno, oldest first.
{ "resource": "" }
c155511
train
// PrepareConfig is defined on the environs.EnvironProvider interface.
{ "resource": "" }
c155512
train
// validateCloudSpec validates the given configuration against the oracle cloud spec
{ "resource": "" }
c155513
train
// Open is defined on the environs.EnvironProvider interface.
{ "resource": "" }
c155514
train
// Validate is defined on the config.Validator interface.
{ "resource": "" }
c155515
train
// FinalizeCredential is defined on the environs.ProviderCredentials interface.
{ "resource": "" }
c155516
train
// Main registers subcommands for the juju executable, and hands over control // to the cmd package. This function is not redundant with main, because it // provides an entry point for testing with arbitrary command line arguments. // This function returns the exit code, for main to pass to os.Exit.
{ "resource": "" }
c155517
train
// Run is the main entry point for the juju client.
{ "resource": "" }
c155518
train
// Authenticate authenticates the entity with the specified tag, and returns an // error on authentication failure. // // If and only if no password is supplied, then Authenticate will check for any // valid macaroons. Otherwise, password authentication will be performed.
{ "resource": "" }
c155519
train
// UpdateClient updates the UserAgent field of the given autorest.Client.
{ "resource": "" }
c155520
train
// NewCaasOperatorAgent creates a new CAASOperatorAgent instance properly initialized.
{ "resource": "" }
c155521
train
// maybeCopyAgentConfig copies the read-only agent config template // to the writeable agent config file if the file doesn't yet exist.
{ "resource": "" }
c155522
train
// Workers returns a dependency.Engine running the operator's responsibilities.
{ "resource": "" }
c155523
train
// ChangeConfig implements Agent.
{ "resource": "" }
c155524
train
// ConnectAsAgent really connects to the API specified in the agent // config. It's extracted so tests can pass something else in.
{ "resource": "" }
c155525
train
// NewCheckConnectionCommand returns a command that will test // connecting to the API with details from the agent's config.
{ "resource": "" }
c155526
train
// NewIsolatedStatusWorker creates a new status worker that runs without an API connection.
{ "resource": "" }
c155527
train
// ParseModelType turns a valid model type string into a ModelType // constant.
{ "resource": "" }
c155528
train
// String implements fmt.Stringer returning the string representation of an // SLALevel.
{ "resource": "" }
c155529
train
// newSLALevel returns a new SLA level from a string representation.
{ "resource": "" }
c155530
train
// filteredModelUUIDs returns all model uuids that match the filter.
{ "resource": "" }
c155531
train
// ModelExists returns true if a model with the supplied UUID exists.
{ "resource": "" }
c155532
train
// Validate validates the ModelArgs.
{ "resource": "" }
c155533
train
// validateCloudRegion validates the given region name against the // provided Cloud definition, and returns a txn.Op to include in a // transaction to assert the same.
{ "resource": "" }
c155534
train
// validateCloudCredential validates the given cloud credential // name against the provided cloud definition and credentials, // and returns a txn.Op to include in a transaction to assert the // same. A user is supplied, for which access to the credential // will be asserted.
{ "resource": "" }
c155535
train
// ModelTag is the concrete model tag for this model.
{ "resource": "" }
c155536
train
// ControllerTag is the tag for the controller that the model is // running within.
{ "resource": "" }
c155537
train
// CloudCredential returns the tag of the cloud credential used for managing the // model's cloud resources, and a boolean indicating whether a credential is set.
{ "resource": "" }
c155538
train
// SetMigrationMode updates the migration mode of the model.
{ "resource": "" }
c155539
train
// Owner returns tag representing the owner of the model. // The owner is the user that created the model.
{ "resource": "" }
c155540
train
// Status returns the status of the model.
{ "resource": "" }
c155541
train
// localID returns the local id value by stripping off the model uuid prefix // if it is there.
{ "resource": "" }
c155542
train
// SetSLA sets the SLA on the model.
{ "resource": "" }
c155543
train
// SetMeterStatus sets the current meter status for this model.
{ "resource": "" }
c155544
train
// MeterStatus returns the current meter status for this model.
{ "resource": "" }
c155545
train
// SetEnvironVersion sets the model's current environ version. The value // must be monotonically increasing.
{ "resource": "" }
c155546
train
// AllUnits returns all units for a model, for all applications.
{ "resource": "" }
c155547
train
// AllEndpointBindings returns all endpoint->space bindings for every application
{ "resource": "" }
c155548
train
// Users returns a slice of all users for this model.
{ "resource": "" }
c155549
train
// IsControllerModel returns a boolean indicating whether // this model is responsible for running a controller.
{ "resource": "" }
c155550
train
// Destroy sets the models's lifecycle to Dying, preventing // addition of applications or machines to state. If called on // an empty hosted model, the lifecycle will be advanced // straight to Dead.
{ "resource": "" }
c155551
train
// IsHasHostedModelsError reports whether or not the given error // was caused by an attempt to destroy the controller model while // it contained non-empty hosted models, without specifying that // they should also be destroyed.
{ "resource": "" }
c155552
train
// IsModelNotEmptyError reports whether or not the given error was caused // due to an operation requiring a model to be empty, where the model is // non-empty.
{ "resource": "" }
c155553
train
// getEntityRefs reads the current model entity refs document for the model.
{ "resource": "" }
c155554
train
// checkModelEntityRefsEmpty checks that the model is empty of any entities // that may require external resource cleanup. If the model is not empty, // then an error will be returned; otherwise txn.Ops are returned to assert // the continued emptiness.
{ "resource": "" }
c155555
train
// checkModelEntityRefsNoPersistentStorage checks that there is no // persistent storage in the model. If there is, then an error of // type hasPersistentStorageError is returned. If there is not, // txn.Ops are returned to assert the same.
{ "resource": "" }
c155556
train
// checkModelEntityRefsAllReleasableStorage checks that there all // persistent storage in the model is releasable. If it is, then // txn.Ops are returned to assert the same; if it is not, then an // error is returned.
{ "resource": "" }
c155557
train
// createModelOp returns the operation needed to create // an model document with the given name and UUID.
{ "resource": "" }
c155558
train
// createUniqueOwnerModelNameOp returns the operation needed to create // an usermodelnameC document with the given qualifier and model name.
{ "resource": "" }
c155559
train
// assertModelActiveOp returns a txn.Op that asserts the given // model UUID refers to an Alive model.
{ "resource": "" }
c155560
train
// Run adds the requested remote offer to the model. Implements // cmd.Command.
{ "resource": "" }
c155561
train
// MatchHook returns true if the specified hook name matches // the hook specified by the debug-hooks client.
{ "resource": "" }
c155562
train
// RunHook "runs" the hook with the specified name via debug-hooks.
{ "resource": "" }
c155563
train
// FindSession attempts to find a debug hooks session for the unit specified // in the context, and returns a new ServerSession structure for it.
{ "resource": "" }
c155564
train
// gatherMachineParams collects all the information we know about the machine // we are about to provision. It will SSH into that machine as the ubuntu user. // The hostname supplied should not include a username. // If we can, we will reverse lookup the hostname by its IP address, and use // the DNS resolved name, rat...
{ "resource": "" }
c155565
train
// ProvisioningScript generates a bash script that can be // executed on a remote host to carry out the cloud-init // configuration.
{ "resource": "" }
c155566
train
// NewRemoveOfferCommand returns a command used to remove a specified offer.
{ "resource": "" }
c155567
train
// NewApplicationOffersAPI returns an application offers api.
{ "resource": "" }
c155568
train
// getBlockAPI returns a block api for block manipulation.
{ "resource": "" }
c155569
train
// ProcessBlockedError ensures that correct and user-friendly message is // displayed to the user based on the block type.
{ "resource": "" }
c155570
train
// MarshalToolsMetadataJSON marshals tools metadata to index and products JSON. // updated is the time at which the JSON file was updated.
{ "resource": "" }
c155571
train
// marshalToolsMetadataIndexJSON marshals tools metadata to index JSON. // updated is the time at which the JSON file was updated.
{ "resource": "" }
c155572
train
// MarshalToolsMetadataProductsJSON marshals tools metadata to products JSON. // updated is the time at which the JSON file was updated.
{ "resource": "" }
c155573
train
// NewUnregisterCommand returns a command to allow the user to unregister a controller.
{ "resource": "" }
c155574
train
// Info implements Command.Info // `unregister` may seem generic as a command, but aligns with `register`.
{ "resource": "" }
c155575
train
// Disable implements Recorder.
{ "resource": "" }
c155576
train
// Enable implements Recorder.
{ "resource": "" }
c155577
train
// IsEnabled implements Recorder.
{ "resource": "" }
c155578
train
// Connect implements Recorder.
{ "resource": "" }
c155579
train
// Disconnect implements Recorder.
{ "resource": "" }
c155580
train
// Activity implements Recorder.
{ "resource": "" }
c155581
train
// ServerDown implements Recorder.
{ "resource": "" }
c155582
train
// UpdateServer implements Recorder.
{ "resource": "" }
c155583
train
// Connections implements Recorder.
{ "resource": "" }
c155584
train
// ForModel implements Connections.
{ "resource": "" }
c155585
train
// ForServer implements Connections.
{ "resource": "" }
c155586
train
// ForAgent implements Connections.
{ "resource": "" }
c155587
train
// Models implements Connections.
{ "resource": "" }
c155588
train
// Servers implements Connections.
{ "resource": "" }
c155589
train
// Agents implements Connections.
{ "resource": "" }
c155590
train
// AgentStatus implements Connections.
{ "resource": "" }
c155591
train
// SetConfig updates the Environ's configuration. // // Calls to SetConfig do not affect the configuration of values previously obtained // from Storage.
{ "resource": "" }
c155592
train
// ControllerInstances is part of the Environ interface.
{ "resource": "" }
c155593
train
// Destroy shuts down all known machines and destroys the // rest of the environment. Note that on some providers, // very recently started instances may not be destroyed // because they are not yet visible. // // When Destroy has been called, any Environ referring to the // same remote environment may become invalid
{ "resource": "" }
c155594
train
// NewSshInstanceConfigurator creates new sshInstanceConfigurator.
{ "resource": "" }
c155595
train
// DropAllPorts implements InstanceConfigurator interface.
{ "resource": "" }
c155596
train
// ConfigureExternalIpAddressCommands returns the commands to run to configure // the external IP address
{ "resource": "" }
c155597
train
// ConfigureExternalIpAddress implements InstanceConfigurator interface.
{ "resource": "" }
c155598
train
// ChangeIngressRules implements InstanceConfigurator interface.
{ "resource": "" }
c155599
train
// FindIngressRules implements InstanceConfigurator interface.
{ "resource": "" }