_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c4100
// unpinLeaders unpins leadership for applications // represented by units running on this machine.
c4101
// Unit services returns a map of unit agent service names, // keyed on their unit IDs.
c4102
// unitNames returns a comma-delimited string of unit names based on the input // map of unit agent services.
c4103
// NewEndpointPath returns the API URL path for the identified resource.
c4104
// ExtractEndpointDetails pulls the endpoint wildcard values from // the provided URL.
c4105
// SendHTTPStatusAndJSON sends an HTTP status code and // a JSON-encoded response to a client.
c4106
// NewWorker returns a worker that unlocks the model upgrade gate.
c4107
// NewAPI returns a new charm annotator API facade.
c4108
// Get returns annotations for given entities. // If annotations cannot be retrieved for a given entity, an error is returned. // Each entity is treated independently and, hence, will fail or succeed independently.
c4109
// Set stores annotations for given entities
c4110
// UpgradeSeriesPrepare is the interface to the API server endpoint of the same // name. Since this function's interface will be mocked as an external test // dependency this function should contain minimal logic other than gathering an // API handle and making the API call.
c4111
// displayNotifications handles the writing of upgrade series notifications to // standard out.
c4112
// UpgradeSeriesComplete completes a series upgrade for a given machine, // that is if a machine is marked as upgrading using UpgradeSeriesPrepare, // then this command will complete that process and the machine will no longer // be marked as upgrading.
c4113
// Status returns the status of the unit agent.
c4114
// SetStatus sets the status of the unit agent. The optional values // allow to pass additional helpful status data.
c4115
// Path returns the qualified name of the network.
c4116
// newInterface builds up all the data needed by the GCE API to create // a new interface connected to the network.
c4117
// firewallSpec expands a port range set in to compute.FirewallAllowed // and returns a compute.Firewall for the provided name.
c4118
// ModelStatus returns a summary of the model.
c4119
// ModelFilesystemInfo returns information about filesystems in the model.
c4120
// ModelVolumeInfo returns information about volumes in the model.
c4121
// NewRelationIdValue returns a gnuflag.Value for convenient parsing of relation // ids in ctx.
c4122
// Set interprets value as a relation id, if possible, and returns an error // if it is not known to the system. The parsed relation id will be written // to v.result.
c4123
// FriendlyDuration renders a time pointer that we get from the API as // a friendly string.
c4124
// ModelInfoFromParams translates a params.ModelInfo to ModelInfo.
c4125
// OwnerQualifiedModelName returns the model name qualified with the // model owner if the owner is not the same as the given canonical // user name. If the owner is a local user, we omit the domain.
c4126
// NewCharmResourcesCommand returns a new command that lists resources defined // by a charm.
c4127
// ListCharmResources implements CharmResourceLister by getting the charmstore client // from the command's ModelCommandBase.
c4128
// body of generic pruner loop
c4129
// finalizeConfig creates the config object from attributes, // and calls EnvironProvider.PrepareConfig.
c4130
// Provision returns a new machineId and nil if the provision process is done successfully // The func will manual provision a linux machine using as it's default protocol SSH
c4131
// NewCredentialInvalidatorFacade creates an API facade capable of invalidating credential.
c4132
// NewCloudCallContext creates a cloud call context to be used by workers.
c4133
// NewDisableCommand returns a disable-command command instance // that will use the default API.
c4134
// NewDeployerAPI creates a new server-side DeployerAPI facade.
c4135
// SetStatus sets the status of the specified entities.
c4136
// getAllUnits returns a list of all principal and subordinate units // assigned to the given machine.
c4137
// NewRestoreCommand returns a command used to restore a backup.
c4138
// SetFlags handles known option flags.
c4139
// Init is where the preconditions for this command can be checked.
c4140
// Run is the entry point for this command.
c4141
// NewWorker creates a new agent config updater worker.
c4142
// SingularClaimer returns a lease.Claimer representing the exclusive right to // manage the model.
c4143
// counterpartRole returns the RelationRole that this RelationRole // can relate to. // This should remain an internal method because the relation // model does not guarantee that for every role there will // necessarily exist a single counterpart role that is sensible // for basing algorithms upon.
c4144
// CanRelateTo returns whether a relation may be established between e and other.
c4145
// NewStateFirewallerAPIV3 creates a new server-side FirewallerAPIV3 facade.
c4146
// NewStateFirewallerAPIV4 creates a new server-side FirewallerAPIV4 facade.
c4147
// NewStateFirewallerAPIV5 creates a new server-side FirewallerAPIV5 facade.
c4148
// NewFirewallerAPI creates a new server-side FirewallerAPIV3 facade.
c4149
// WatchOpenedPorts returns a new StringsWatcher for each given // model tag.
c4150
// GetMachinePorts returns the port ranges opened on a machine for the specified // subnet as a map mapping port ranges to the tags of the units that opened // them.
c4151
// GetExposed returns the exposed flag value for each given application.
c4152
// WatchIngressAddressesForRelations creates a watcher that returns the ingress networks // that have been recorded against the specified relations.
c4153
// MacaroonForRelations returns the macaroon for the specified relations.
c4154
// SetRelationsStatus sets the status for the specified relations.
c4155
// FirewallRules returns the firewall rules for the specified well known service types.
c4156
// NewDBInfo returns the information needed by backups to dump // the database.
c4157
// NewDBDumper returns a new value with a Dump method for dumping the // juju state database.
c4158
// Dump dumps the juju state-related databases. To do this we dump all // databases and then remove any ignored databases from the dump results.
c4159
// listDatabases returns the name of each sub-directory of the dump // directory. Each corresponds to a database dump generated by // mongodump. Note that, while mongodump is unlikely to change behavior // in this regard, this is not a documented guaranteed behavior.
c4160
// NewDBRestorer returns a new structure that can perform a restore // on the db pointed in dialInfo.
c4161
// ensureOplogPermissions adds a special role to the admin user, this role // is required by mongorestore when doing oplogreplay.
c4162
// NewUniter creates a new Uniter which will install, run, and upgrade // a charm on behalf of the unit with the given unitTag, by executing // hooks and operations provoked by changes in st.
c4163
// StartUniter creates a new Uniter and starts it using the specified runner.
c4164
// stopUnitError returns the error to use when exiting from stopping the unit. // For IAAS models, we want to terminate the agent, as each unit is run by // an individual agent for that unit.
c4165
// acquireExecutionLock acquires the machine-level execution lock, and // returns a func that must be called to unlock it. It's used by operation.Executor // when running operations that execute external code.
c4166
// ReadLegacyCloudCredentials reads cloud credentials off disk for an old // LXD controller, and returns them as a cloud.Credential with the // certificate auth-type. // // If the credential files are missing from the filesystem, an error // satisfying errors.IsNotFound will be returned.
c4167
// ValidateExistingModelCredential checks if the cloud credential that a given model uses is valid for it.
c4168
// ValidateNewModelCredential checks if a new cloud credential could be valid for a given model.
c4169
// checkMachineInstances compares model machines from state with // the ones reported by the provider using supplied credential. // This only makes sense for non-k8s providers.
c4170
// BootstrapEnv bootstraps the Juju environment.
c4171
// DestroyEnv destroys the Juju environment.
c4172
// addPackageCommandsCommon is a helper function which applies the given // packaging-related options to the given CloudConfig.
c4173
// renderScriptCommon is a helper function which generates a bash script that // applies all the settings given by the provided CloudConfig when run.
c4174
// restrictRoot wraps the provided root so that the check function is // called on all method lookups. If the check returns an error the API // call is blocked.
c4175
// FindMethod implements rpc.Root.
c4176
// restrictAll blocks all API requests, returned a fixed error.
c4177
// osVal will lookup the value of the key valname // in the appropriate map, based on the series. This will // help reduce boilerplate code
c4178
// makeWatcherAPICaller creates a watcherAPICall function for a given facade name // and watcherId.
c4179
// init must be called to initialize an embedded commonWatcher's // fields. Make sure newResult and call fields are set beforehand.
c4180
// commonLoop implements the loop structure common to the client // watchers. It should be started in a separate goroutine by any // watcher that embeds commonWatcher. It kills the commonWatcher's // tomb when an error occurs.
c4181
// If an API call returns a NotifyWatchResult, you can use this to turn it into // a local Watcher.
c4182
// NewRelationStatusWatcher returns a watcher notifying of changes to // relation life and suspended status.
c4183
// NewOfferStatusWatcher returns a watcher notifying of changes to // offer status.
c4184
// NewVolumeAttachmentsWatcher returns a MachineStorageIdsWatcher which // communicates with the VolumeAttachmentsWatcher API facade to watch // volume attachments.
c4185
// NewMigrationStatusWatcher takes the NotifyWatcherId returns by the // MigrationSlave.Watch API and returns a watcher which will report // status changes for any migration of the model associated with the // API connection.
c4186
// BridgeAndActivate will parse a set of netplan yaml files in a directory, // create a new netplan config with the provided interfaces bridged // bridged, then reconfigure the network using the ifupdown package // for the new bridges.
c4187
// New returns a Pollster that wraps the given reader and writer.
c4188
// Select queries the user to select from the given list of options.
c4189
// SelectVerify queries the user to select from the given list of options, // verifying the choice by passing responses through verify.
c4190
// Enter requests that the user enter a value. Any value except an empty string // is accepted.
c4191
// EnterPassword works like Enter except that if the pollster's input wraps a // terminal, the user's input will be read without local echo.
c4192
// EnterDefault requests that the user enter a value. Any value is accepted. // An empty string is treated as defVal.
c4193
// EnterOptional requests that the user enter a value. It accepts any value, // even an empty string.
c4194
// EnterVerifyDefault requests that the user enter a value. Values failing to // verify will be rejected with the error message returned by verify. An empty // string will be accepted as the default value even if it would fail // verification.
c4195
// VerifyOptions is the verifier used by pollster.Select.
c4196
// names returns the list of names of schema in alphabetical order.
c4197
// convert converts the given string to a specific value based on the schema // type that validated it.
c4198
// NewUnitAgent creates a new UnitAgent value properly initialized.
c4199
// Done signals the unit agent is finished