_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c5100
train
// String implements gnuflag.Value's String method
{ "resource": "" }
c5101
train
// CurrentConfig is part of the agent.Agent interface. This implementation // returns an agent.Config that reports tweaked API connection information.
{ "resource": "" }
c5102
train
// APIInfo is part of the agent.Config interface. This implementation always // replaces the target model tag with the configured model tag.
{ "resource": "" }
c5103
train
// NewWorker creates a new worker which will install and operate a // CaaS-based application, by executing hooks and operations in // response to application state changes.
{ "resource": "" }
c5104
train
// Juju1xEnvConfigExists returns true if there is an environments.yaml file in // the expected juju 1.x directory.
{ "resource": "" }
c5105
train
// OldJujuHomeDir returns the directory where juju 1.x stored // application-specific files.
{ "resource": "" }
c5106
train
// Prune calls "StatusHistory.Prune"
{ "resource": "" }
c5107
train
// NewMockSummary creates a new mock instance
{ "resource": "" }
c5108
train
// Collect indicates an expected call of Collect
{ "resource": "" }
c5109
train
// Observe mocks base method
{ "resource": "" }
c5110
train
// Handle triggers the collect-metrics hook and writes collected metrics // to the specified connection.
{ "resource": "" }
c5111
train
// NewProvisionerWorker starts and returns a new CAAS provisioner worker.
{ "resource": "" }
c5112
train
// ensureOperators creates operator pods for the specified app names -> api passwords.
{ "resource": "" }
c5113
train
// Manifold returns a dependency.Manifold that will run a peergrouper.
{ "resource": "" }
c5114
train
// Run connects to the environment specified on the command line // and calls EnableHA.
{ "resource": "" }
c5115
train
// Convert machine tags to ids, skipping any non-machine tags.
{ "resource": "" }
c5116
train
// OpenResource implements server.ResourceOpener.
{ "resource": "" }
c5117
train
// Validate returns an error if the config cannot be expected to drive // a functional undertaker worker.
{ "resource": "" }
c5118
train
// NewUndertaker returns a worker which processes a dying model.
{ "resource": "" }
c5119
train
// ImportModel deserializes a model description from the bytes, transforms // the model config based on information from the controller model, and then // imports that as a new database model.
{ "resource": "" }
c5120
train
// Validate makes sure that all the config values are non-nil.
{ "resource": "" }
c5121
train
// UploadBinaries will send binaries stored in the source blobstore to // the target controller.
{ "resource": "" }
c5122
train
// Recorder implements the MetricFactory interface.
{ "resource": "" }
c5123
train
// Manifold returns a dependency.Manifold that extracts the metrics // spool directory path from the agent.
{ "resource": "" }
c5124
train
// newWorker creates a degenerate worker that provides access to the metrics // spool directory path.
{ "resource": "" }
c5125
train
// FormatPayload converts the Payload into a FormattedPayload.
{ "resource": "" }
c5126
train
// EnsureCachedImage is the first supply of start-params to the container. // We set it here for subsequent test assertions. // Start is called by the manager immediately after, with the same argument.
{ "resource": "" }
c5127
train
// Stop terminates the running container.
{ "resource": "" }
c5128
train
// SourcePrecheck checks the state of the source controller to make // sure that the preconditions for model migration are met. The // backend provided must be for the model to be migrated.
{ "resource": "" }
c5129
train
// TargetPrecheck checks the state of the target controller to make // sure that the preconditions for model migration are met. The // backend provided must be for the target controller.
{ "resource": "" }
c5130
train
// IsMetricsDataError returns true if the error // cause is errMetricsData.
{ "resource": "" }
c5131
train
// APIMetricBatch converts the specified MetricBatch to a params.MetricBatch, // which can then be sent to the controller.
{ "resource": "" }
c5132
train
// NewJSONMetricRecorder creates a new JSON metrics recorder.
{ "resource": "" }
c5133
train
// Close implements the MetricsRecorder interface.
{ "resource": "" }
c5134
train
// AddMetric implements the MetricsRecorder interface.
{ "resource": "" }
c5135
train
// IsDeclaredMetric returns true if the metric recorder is permitted to store this metric. // Returns false if the uniter using this recorder doesn't define this metric.
{ "resource": "" }
c5136
train
// NewJSONMetricsReader creates a new JSON metrics reader for the specified spool directory.
{ "resource": "" }
c5137
train
// Read implements the MetricsReader interface. // Due to the way the batches are stored in the file system, // they will be returned in an arbitrary order. This does not affect the behavior.
{ "resource": "" }
c5138
train
// Remove implements the MetricsReader interface.
{ "resource": "" }
c5139
train
// AddPendingResources adds pending metadata for store-based resources.
{ "resource": "" }
c5140
train
// checkOperation requests a new copy of the given operation from the // GCE API and returns it. The new copy will have the operation's // current status.
{ "resource": "" }
c5141
train
// ListMachineTypes returns a list of machines available in the project and zone provided.
{ "resource": "" }
c5142
train
// Validate ensures all the necessary values are specified
{ "resource": "" }
c5143
train
// NewWorker creates a new cacheWorker, and starts an // all model watcher.
{ "resource": "" }
c5144
train
// runForAllModelStates will run runner function for every model passing a state // for that model.
{ "resource": "" }
c5145
train
// readBsonDField returns the value of a given field in a bson.D.
{ "resource": "" }
c5146
train
// replaceBsonDField replaces a field in bson.D.
{ "resource": "" }
c5147
train
// RenameAddModelPermission renames any permissions called addmodel to add-model.
{ "resource": "" }
c5148
train
// StripLocalUserDomain removes any @local suffix from any relevant document field values.
{ "resource": "" }
c5149
train
// AddMigrationAttempt adds an "attempt" field to migration documents // which are missing one.
{ "resource": "" }
c5150
train
// AddLocalCharmSequences creates any missing sequences in the // database for tracking already used local charm revisions.
{ "resource": "" }
c5151
train
// UpdateLegacyLXDCloudCredentials updates the cloud credentials for the // LXD-based controller, and updates the cloud endpoint with the given // value.
{ "resource": "" }
c5152
train
// UpgradeNoProxyDefaults changes the default values of no_proxy // to hold localhost values as defaults.
{ "resource": "" }
c5153
train
// RemoveNilValueApplicationSettings removes any application setting // key-value pairs from "settings" where value is nil.
{ "resource": "" }
c5154
train
// AddControllerLogCollectionsSizeSettings adds the controller // settings to control log pruning and txn log size if they are missing.
{ "resource": "" }
c5155
train
// applyToAllModelSettings iterates the model settings documents and applys the // passed in function to them. If the function returns 'true' it indicates the // settings have been modified, and they should be written back to the // database. // Note that if there are any problems with updating settings, then none of ...
{ "resource": "" }
c5156
train
// AddStatusHistoryPruneSettings adds the model settings // to control log pruning if they are missing.
{ "resource": "" }
c5157
train
// AddActionPruneSettings adds the model settings // to control log pruning if they are missing.
{ "resource": "" }
c5158
train
// AddUpdateStatusHookSettings adds the model settings // to control how often to run the update-status hook // if they are missing.
{ "resource": "" }
c5159
train
// SplitLogCollections moves log entries from the old single log collection // to the log collection per model.
{ "resource": "" }
c5160
train
// MoveOldAuditLog renames the no-longer-needed audit.log collection // to old-audit.log if it has any rows - if it's empty it deletes it.
{ "resource": "" }
c5161
train
// DeleteCloudImageMetadata deletes any non-custom cloud // image metadata records from the cloudimagemetadata collection.
{ "resource": "" }
c5162
train
// CopyMongoSpaceToHASpaceConfig copies the Mongo space name from // ControllerInfo to the HA space name in ControllerConfig. // This only happens if the Mongo space state is valid, it is not empty, // and if there is no value already set for the HA space name. // The old keys are then deleted from ControllerInfo.
{ "resource": "" }
c5163
train
// CreateMissingApplicationConfig ensures that all models have an application config in the db.
{ "resource": "" }
c5164
train
// RemoveVotingMachineIds ensures that the 'votingmachineids' field on controller info has been removed
{ "resource": "" }
c5165
train
// AddCloudModelCounts updates cloud docs to ensure the model count field is set.
{ "resource": "" }
c5166
train
// UpgradeDefaultContainerImageStreamConfig ensures that the config value for // container-image-stream is set to its default value, "released".
{ "resource": "" }
c5167
train
// ReplicaSetMembers gets the members of the current Mongo replica // set. These are needed to bootstrap the raft cluster in an upgrade // and using MongoSession directly from an upgrade steps would make // testing difficult.
{ "resource": "" }
c5168
train
// LegacyLeases returns information about all of the leases in the // state-based lease store.
{ "resource": "" }
c5169
train
// MigrateAddModelPermissions converts add-model permissions on the controller // to add-model permissions on the controller cloud.
{ "resource": "" }
c5170
train
// SetEnableDiskUUIDOnVsphere updates the settings for all vsphere // models to have enable-disk-uuid=false. The new default is true, but // this maintains the previous behaviour for upgraded models.
{ "resource": "" }
c5171
train
// UpdateInheritedControllerConfig migrates the existing global // settings doc keyed on "controller" to be keyed on the cloud name.
{ "resource": "" }
c5172
train
// EnsureDefaultModificationStatus ensures that there is a modification status // document for every machine in the statuses.
{ "resource": "" }
c5173
train
// EnsureApplicationDeviceConstraints ensures that there is a device // constraints document for every application.
{ "resource": "" }
c5174
train
// RemoveInstanceCharmProfileDataCollection removes the // instanceCharmProfileData collection on upgrade.
{ "resource": "" }
c5175
train
// CreateVolumes is defined on storage.VolumeSource.
{ "resource": "" }
c5176
train
// ListVolumes is defined on storage.VolumeSource.
{ "resource": "" }
c5177
train
// DescribeVolumes is defined on storage.VolumeSource.
{ "resource": "" }
c5178
train
// DestroyVolumes is defined on storage.VolumeSource.
{ "resource": "" }
c5179
train
// ReleaseVolumes is defined on storage.VolumeSource.
{ "resource": "" }
c5180
train
// ValidateVolumeParams is defined on storage.VolumeSource.
{ "resource": "" }
c5181
train
// AttachVolumes is defined on storage.VolumeSource.
{ "resource": "" }
c5182
train
// DetachVolumes is defined on storage.VolumeSource.
{ "resource": "" }
c5183
train
// NewAgentEntityWatcher returns a new AgentEntityWatcher. The // GetAuthFunc will be used on each invocation of Watch to determine // current permissions.
{ "resource": "" }
c5184
train
// Watch starts an NotifyWatcher for each given entity.
{ "resource": "" }
c5185
train
// dumpMetadata writes the formatted backup metadata to stdout.
{ "resource": "" }
c5186
train
// Validate validates the Azure provider configuration.
{ "resource": "" }
c5187
train
// NewEnvironProvider returns a new EnvironProvider for Azure.
{ "resource": "" }
c5188
train
// NewLeadershipPinningAPI creates and returns a new leadership API client.
{ "resource": "" }
c5189
train
// PinnedLeadership returns a collection of application names for which // leadership is currently pinned, with the entities requiring each // application's pinned behaviour.
{ "resource": "" }
c5190
train
// PinMachineApplications pins leadership for applications represented by units // running on the local machine. // If the caller is not a machine agent, an error will be returned. // The return is a collection of applications determined to be running on the // machine, with the result of each individual pin operation.
{ "resource": "" }
c5191
train
// pinMachineAppsOps makes a facade call to the input method name and // transforms the response into map.
{ "resource": "" }
c5192
train
// NewUniterResolver returns a new resolver.Resolver for the uniter.
{ "resource": "" }
c5193
train
// nextOpConflicted is called after an upgrade operation has failed, and hasn't // yet been resolved or reverted. When in this mode, the resolver will only // consider those two possibilities for progressing.
{ "resource": "" }
c5194
train
// The NopResolver's NextOp operation should always return the no operation error.
{ "resource": "" }
c5195
train
// Lockdown is part of the Guard interface.
{ "resource": "" }
c5196
train
// Visit is part of the Guest interface.
{ "resource": "" }
c5197
train
// allowGuests communicates Guard-interface requests to the main loop.
{ "resource": "" }
c5198
train
// loop waits for a Guard to unlock the fortress, and then runs visit funcs in // parallel until a Guard locks it down again; at which point, it waits for all // outstanding visits to complete, and reverts to its original state.
{ "resource": "" }
c5199
train
// GenerateClientCertificate creates and returns a new certificate for client // communication with an LXD server.
{ "resource": "" }