_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c5100
// String implements gnuflag.Value's String method
c5101
// CurrentConfig is part of the agent.Agent interface. This implementation // returns an agent.Config that reports tweaked API connection information.
c5102
// APIInfo is part of the agent.Config interface. This implementation always // replaces the target model tag with the configured model tag.
c5103
// 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.
c5104
// Juju1xEnvConfigExists returns true if there is an environments.yaml file in // the expected juju 1.x directory.
c5105
// OldJujuHomeDir returns the directory where juju 1.x stored // application-specific files.
c5106
// Prune calls "StatusHistory.Prune"
c5107
// NewMockSummary creates a new mock instance
c5108
// Collect indicates an expected call of Collect
c5109
// Observe mocks base method
c5110
// Handle triggers the collect-metrics hook and writes collected metrics // to the specified connection.
c5111
// NewProvisionerWorker starts and returns a new CAAS provisioner worker.
c5112
// ensureOperators creates operator pods for the specified app names -> api passwords.
c5113
// Manifold returns a dependency.Manifold that will run a peergrouper.
c5114
// Run connects to the environment specified on the command line // and calls EnableHA.
c5115
// Convert machine tags to ids, skipping any non-machine tags.
c5116
// OpenResource implements server.ResourceOpener.
c5117
// Validate returns an error if the config cannot be expected to drive // a functional undertaker worker.
c5118
// NewUndertaker returns a worker which processes a dying model.
c5119
// 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.
c5120
// Validate makes sure that all the config values are non-nil.
c5121
// UploadBinaries will send binaries stored in the source blobstore to // the target controller.
c5122
// Recorder implements the MetricFactory interface.
c5123
// Manifold returns a dependency.Manifold that extracts the metrics // spool directory path from the agent.
c5124
// newWorker creates a degenerate worker that provides access to the metrics // spool directory path.
c5125
// FormatPayload converts the Payload into a FormattedPayload.
c5126
// 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.
c5127
// Stop terminates the running container.
c5128
// 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.
c5129
// 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.
c5130
// IsMetricsDataError returns true if the error // cause is errMetricsData.
c5131
// APIMetricBatch converts the specified MetricBatch to a params.MetricBatch, // which can then be sent to the controller.
c5132
// NewJSONMetricRecorder creates a new JSON metrics recorder.
c5133
// Close implements the MetricsRecorder interface.
c5134
// AddMetric implements the MetricsRecorder interface.
c5135
// 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.
c5136
// NewJSONMetricsReader creates a new JSON metrics reader for the specified spool directory.
c5137
// 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.
c5138
// Remove implements the MetricsReader interface.
c5139
// AddPendingResources adds pending metadata for store-based resources.
c5140
// 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.
c5141
// ListMachineTypes returns a list of machines available in the project and zone provided.
c5142
// Validate ensures all the necessary values are specified
c5143
// NewWorker creates a new cacheWorker, and starts an // all model watcher.
c5144
// runForAllModelStates will run runner function for every model passing a state // for that model.
c5145
// readBsonDField returns the value of a given field in a bson.D.
c5146
// replaceBsonDField replaces a field in bson.D.
c5147
// RenameAddModelPermission renames any permissions called addmodel to add-model.
c5148
// StripLocalUserDomain removes any @local suffix from any relevant document field values.
c5149
// AddMigrationAttempt adds an "attempt" field to migration documents // which are missing one.
c5150
// AddLocalCharmSequences creates any missing sequences in the // database for tracking already used local charm revisions.
c5151
// UpdateLegacyLXDCloudCredentials updates the cloud credentials for the // LXD-based controller, and updates the cloud endpoint with the given // value.
c5152
// UpgradeNoProxyDefaults changes the default values of no_proxy // to hold localhost values as defaults.
c5153
// RemoveNilValueApplicationSettings removes any application setting // key-value pairs from "settings" where value is nil.
c5154
// AddControllerLogCollectionsSizeSettings adds the controller // settings to control log pruning and txn log size if they are missing.
c5155
// 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 the // changes will be applied, as they are all updated in a single transaction.
c5156
// AddStatusHistoryPruneSettings adds the model settings // to control log pruning if they are missing.
c5157
// AddActionPruneSettings adds the model settings // to control log pruning if they are missing.
c5158
// AddUpdateStatusHookSettings adds the model settings // to control how often to run the update-status hook // if they are missing.
c5159
// SplitLogCollections moves log entries from the old single log collection // to the log collection per model.
c5160
// 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.
c5161
// DeleteCloudImageMetadata deletes any non-custom cloud // image metadata records from the cloudimagemetadata collection.
c5162
// 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.
c5163
// CreateMissingApplicationConfig ensures that all models have an application config in the db.
c5164
// RemoveVotingMachineIds ensures that the 'votingmachineids' field on controller info has been removed
c5165
// AddCloudModelCounts updates cloud docs to ensure the model count field is set.
c5166
// UpgradeDefaultContainerImageStreamConfig ensures that the config value for // container-image-stream is set to its default value, "released".
c5167
// 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.
c5168
// LegacyLeases returns information about all of the leases in the // state-based lease store.
c5169
// MigrateAddModelPermissions converts add-model permissions on the controller // to add-model permissions on the controller cloud.
c5170
// 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.
c5171
// UpdateInheritedControllerConfig migrates the existing global // settings doc keyed on "controller" to be keyed on the cloud name.
c5172
// EnsureDefaultModificationStatus ensures that there is a modification status // document for every machine in the statuses.
c5173
// EnsureApplicationDeviceConstraints ensures that there is a device // constraints document for every application.
c5174
// RemoveInstanceCharmProfileDataCollection removes the // instanceCharmProfileData collection on upgrade.
c5175
// CreateVolumes is defined on storage.VolumeSource.
c5176
// ListVolumes is defined on storage.VolumeSource.
c5177
// DescribeVolumes is defined on storage.VolumeSource.
c5178
// DestroyVolumes is defined on storage.VolumeSource.
c5179
// ReleaseVolumes is defined on storage.VolumeSource.
c5180
// ValidateVolumeParams is defined on storage.VolumeSource.
c5181
// AttachVolumes is defined on storage.VolumeSource.
c5182
// DetachVolumes is defined on storage.VolumeSource.
c5183
// NewAgentEntityWatcher returns a new AgentEntityWatcher. The // GetAuthFunc will be used on each invocation of Watch to determine // current permissions.
c5184
// Watch starts an NotifyWatcher for each given entity.
c5185
// dumpMetadata writes the formatted backup metadata to stdout.
c5186
// Validate validates the Azure provider configuration.
c5187
// NewEnvironProvider returns a new EnvironProvider for Azure.
c5188
// NewLeadershipPinningAPI creates and returns a new leadership API client.
c5189
// PinnedLeadership returns a collection of application names for which // leadership is currently pinned, with the entities requiring each // application's pinned behaviour.
c5190
// 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.
c5191
// pinMachineAppsOps makes a facade call to the input method name and // transforms the response into map.
c5192
// NewUniterResolver returns a new resolver.Resolver for the uniter.
c5193
// 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.
c5194
// The NopResolver's NextOp operation should always return the no operation error.
c5195
// Lockdown is part of the Guard interface.
c5196
// Visit is part of the Guest interface.
c5197
// allowGuests communicates Guard-interface requests to the main loop.
c5198
// 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.
c5199
// GenerateClientCertificate creates and returns a new certificate for client // communication with an LXD server.