_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c5200
// NewCertificate creates a new Certificate for the given cert and key.
c5201
// Validate ensures that the cert is valid.
c5202
// WriteCertPEM writes the cert's x.509 PEM data to the given writer.
c5203
// WriteKeyPEM writes the key's x.509 PEM data to the given writer.
c5204
// Fingerprint returns the cert's LXD fingerprint.
c5205
// X509 returns the x.509 certificate.
c5206
// AsCreateRequest creates a payload for the LXD API, suitable for posting the // client certificate to an LXD server.
c5207
// stateStepsFor253 returns upgrade steps for Juju 2.5.3 that manipulate state directly.
c5208
// SetPodSpec sets the pod spec for the given application tag. // An error will be returned if the specified application is not alive.
c5209
// PodSpec returns the pod spec for the given application tag.
c5210
// addNetworkDevice adds an entry to the VirtualMachineConfigSpec's // DeviceChange list, to create a NIC device connecting the machine // to the specified network.
c5211
// VerifyMAC verifies that the MAC is valid for VMWare.
c5212
// computeResourceNetworks returns the networks available to the compute // resource, and the config info for the distributed virtual portgroup // networks. Networks are returned with the distributed virtual portgroups // first, then standard switch networks, and then finally opaque networks.
c5213
// Init captures machineId's to show from CL args.
c5214
// DiscoverService returns an interface to a service appropriate // for the current system
c5215
// VersionInitSystem returns an init system name based on the provided // series. If one cannot be identified a NotFound error is returned.
c5216
// DiscoverInitSystemScript returns the shell script to use when // discovering the local init system. The script is quite specific to // bash, so it includes an explicit bash shbang.
c5217
// newShellSelectCommand creates a bash case statement with clause for // each of the linux init systems. The body of each clause comes from // calling the provided handler with the init system name. If the // handler does not support the args then it returns a false "ok" value.
c5218
// ContainerManagerConfig mocks base method
c5219
// HostChangesForContainer indicates an expected call of HostChangesForContainer
c5220
// Machines mocks base method
c5221
// ResolveFilename returns the filename used by the command.
c5222
// UnknownOrigin returns a new backups origin with unknown values.
c5223
// NewMetadata returns a new Metadata for a state backup archive. Only // the start time and the version are set.
c5224
// NewMetadataState composes a new backup metadata with its origin // values set. The model UUID comes from state. The hostname is // retrieved from the OS.
c5225
// MarkComplete populates the remaining metadata values. The default // checksum format is used.
c5226
// NewMetadataJSONReader extracts a new metadata from the JSON file.
c5227
// BuildMetadata generates the metadata for a backup archive file.
c5228
// ControllerInfo implements ExternalController.
c5229
// Add creates or updates an external controller record.
c5230
// Remove removes an external controller record with the given controller UUID.
c5231
// Controller retrieves an ExternalController with a given controller UUID.
c5232
// ControllerForModel retrieves an ExternalController with a given model UUID.
c5233
// WatchController returns a notify watcher that watches for changes to the // external controller with the specified controller UUID.
c5234
// NewMacaroonCache returns a cache containing macaroons which are removed // after the macaroons' expiry time.
c5235
// Upsert inserts or updates a macaroon slice in the cache.
c5236
// Get returns a macaroon slice from the cache, and a bool indicating // if the slice for the key was found.
c5237
// NewImageMetadataAPI returns a image metadata api for the root api endpoint // that the environment command returns.
c5238
// NewMockFacade creates a new mock instance
c5239
// FinishUpgradeSeries indicates an expected call of FinishUpgradeSeries
c5240
// MachineStatus mocks base method
c5241
// SetMachineStatus mocks base method
c5242
// StartUnitCompletion mocks base method
c5243
// TargetSeries mocks base method
c5244
// UnitsCompleted mocks base method
c5245
// UnpinMachineApplications indicates an expected call of UnpinMachineApplications
c5246
// Infof mocks base method
c5247
// Infof indicates an expected call of Infof
c5248
// NewMockAgentService creates a new mock instance
c5249
// Running mocks base method
c5250
// Running indicates an expected call of Running
c5251
// NewMockServiceAccess creates a new mock instance
c5252
// DiscoverService mocks base method
c5253
// DiscoverService indicates an expected call of DiscoverService
c5254
// ListServices mocks base method
c5255
// ListServices indicates an expected call of ListServices
c5256
// NewMockUpgrader creates a new mock instance
c5257
// PerformUpgrade mocks base method
c5258
// PerformUpgrade indicates an expected call of PerformUpgrade
c5259
// get retrieves the resource info and data from the cache. If only // the info is found then the returned reader will be nil. If no cache // is in use then errors.NotFound is returned.
c5260
// set stores the resource info and data in the cache, // if there is one. If no cache is in use then this is a no-op. Note // that the returned reader may or may not be the same one that was // passed in.
c5261
// Archive writes the executable files found in the given directory in // gzipped tar format to w.
c5262
// archiveAndSHA256 calls Archive with the provided arguments, // and returns a hex-encoded SHA256 hash of the resulting // archive.
c5263
// copyFile writes the contents of the given file to w.
c5264
// tarHeader returns a tar file header given the file's stat // information.
c5265
// closeErrorCheck means that we can ensure that // Close errors do not get lost even when we defer them,
c5266
// ExistingJujudLocation returns the directory to // a jujud executable in the path.
c5267
// bundleTools bundles all the current juju tools in gzipped tar // format to the given writer. If forceVersion is not nil and the // file isn't an official build, a FORCE-VERSION file is included in // the tools bundle so it will lie about its current version number.
c5268
// JujudVersion returns the Jujud version at the specified location, // and whether it is an official binary.
c5269
// AgentConf returns the data that defines an init service config // for the identified agent.
c5270
// ShutdownAfterConf builds a service conf that will cause the host to // shut down after the named service stops.
c5271
// instInfo returns the instance info for the given id // and instance. If inst is nil, it returns a not-found error.
c5272
// Reset implements PeriodicTimer.
c5273
// InitiateMongoServer checks for an existing mongo configuration. // If no existing configuration is found one is created using Initiate.
c5274
// attemptInitiateMongoServer attempts to initiate the replica set.
c5275
// resetReplicaSet re-initiates replica-set using the new controller // values, this is required after a mongo restore. // In case of failure returns error.
c5276
// tagUserCredentials is a convenience function that extracts the // tag user and apipassword, required to access mongodb.
c5277
// newDialInfo returns mgo.DialInfo with the given address using the minimal // possible setup.
c5278
// updateMachineAddresses will update the machine doc to the current addresses
c5279
// connectToDB tries to connect to the newly restored controller.
c5280
// updateAllMachines finds all machines and resets the stored state address // in each of them. The address does not include the port. // It is too late to go back and errors in a couple of agents have // better chance of being fixed by the user, if we were to fail // we risk an inconsistent controller because of one unresponsive // agent, we should nevertheless return the err info to the user.
c5281
// setAgentAddressScript generates an ssh script argument to update state addresses.
c5282
// runMachineUpdate connects via ssh to the machine and runs the update script.
c5283
// runViaSSH runs script in the remote machine with address addr.
c5284
// ParsePlacement attempts to parse the specified string and create a // corresponding Placement structure. // // If the placement directive is non-empty and missing a scope, // ErrPlacementScopeMissing will be returned as well as a Placement // with an empty Scope field.
c5285
// MustParsePlacement attempts to parse the specified string and create // a corresponding Placement structure, panicking if an error occurs.
c5286
// SetMinUnits changes the number of minimum units required by the application.
c5287
// doesMinUnitsExits checks if the minUnits doc exists in the database.
c5288
// minUnitsRemoveOp returns the operation required to remove the minimum // units document from MongoDB.
c5289
// EnsureMinUnits adds new units if the application's MinUnits value is greater // than the number of alive units.
c5290
// aliveUnitsCount returns the number a alive units for the application.
c5291
// ensureMinUnitsOps returns the operations required to add a unit for the // application in MongoDB and the name for the new unit. The resulting transaction // will be aborted if the application document changes when running the operations.
c5292
// AutoConfigureContainerNetworking tries to set up best container networking available // for the specific model if user hasn't set anything.
c5293
// NewFacade returns a singular-controller API facade, backed by the supplied // state, so long as the authorizer represents a controller machine.
c5294
// addPackageSourceCmds is a helper function that returns the corresponding // runcmds to apply the package source settings on a CentOS machine.
c5295
// removeStringFromSlice is a helper function which removes a given string from // the given slice, if it exists it returns the slice, be it modified or unmodified
c5296
// machineName returns the InstanceId, unless DisplayName is set.
c5297
// NewDestroyCommand returns a command used to destroy a model.
c5298
// DestroyContainer implements container.Manager.
c5299
// CreateContainer implements container.Manager.