_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c155200
train
// Addresses is specified in the Instance interface.
{ "resource": "" }
c155201
train
// primaryNetworkAddress returns the instance's primary jujunetwork.Address for // the internal virtual network. This address is used to identify the machine in // network security rules.
{ "resource": "" }
c155202
train
// ClosePorts is specified in the Instance interface.
{ "resource": "" }
c155203
train
// securityRuleName returns the security rule name for the given ingress rule, // and prefix returned by instanceNetworkSecurityRulePrefix.
{ "resource": "" }
c155204
train
// explodeIngressRules creates a slice of ingress rules, each rule in the // result having a single source CIDR. The results contain a copy of each // specified rule with each copy having one of the source CIDR values,
{ "resource": "" }
c155205
train
// newDetectHardwareScript will parse the detectHardware script and add // into the powershell hastable the key,val of the map returned from the // WindowsVersions func from the series pkg. // it will return the script wrapped into a safe powershell base64
{ "resource": "" }
c155206
train
// InitAdministratorUser will initially attempt to login as // the Administrator user using the secure client // only if this is false then this will make a new attempt with the unsecure http client.
{ "resource": "" }
c155207
train
// enableCertAuth enables https cert auth interactions // with the winrm listener and returns the client
{ "resource": "" }
c155208
train
// checkProvisioned checks if the machine is already provisioned or not. // if it's already provisioned it will return true
{ "resource": "" }
c155209
train
// DetectSeriesAndHardwareCharacteristics detects the windows OS // series and hardware characteristics of the remote machine // by connecting to the machine and executing a bash script.
{ "resource": "" }
c155210
train
// splitHardwareScript will split the result from the detectHardware powershell script // to extract the information in a specific order. // this will return a slice of string that will be used in conjunctions with the above function
{ "resource": "" }
c155211
train
// runProvisionScript runs the script generated by the provisioner // the script can be big and the underlying protocol dosen't support long messages // we need to send it into little chunks saving first into a file and then execute it.
{ "resource": "" }
c155212
train
// ProvisioningScript generates a powershell script that can be // executed on a remote host to carry out the cloud-init // configuration.
{ "resource": "" }
c155213
train
// randomAdminPassword returns a random administrator password for // Windows machines.
{ "resource": "" }
c155214
train
// collectAPIVersions returns a map of the latest API version for each // possible resource type. This is needed to use the Azure Resource // Management API, because the API version requested must match the // type of the resource being manipulated through the API, rather than // the API version specified statically in...
{ "resource": "" }
c155215
train
// NewAPI returns a new API. Accepts a NewEnvironFunc and context.ProviderCallContext // for testing purposes.
{ "resource": "" }
c155216
train
// Prechecks ensure that the target controller is ready to accept a // model migration.
{ "resource": "" }
c155217
train
// Import takes a serialized Juju model, deserializes it, and // recreates it in the receiving controller.
{ "resource": "" }
c155218
train
// Abort removes the specified model from the database. It is an error to // attempt to Abort a model that has a migration mode other than importing.
{ "resource": "" }
c155219
train
// Activate sets the migration mode of the model to "none", meaning it // is ready for use. It is an error to attempt to Abort a model that // has a migration mode other than importing.
{ "resource": "" }
c155220
train
// CloudFromKubeConfig attempts to extract a cloud and credential details from the provided Kubeconfig.
{ "resource": "" }
c155221
train
// ParseCloudRegion breaks apart a clusters cloud region.
{ "resource": "" }
c155222
train
// BaseKubeCloudOpenParams provides a basic OpenParams for a cluster
{ "resource": "" }
c155223
train
// GetMetrics will receive metrics collected by the given entity
{ "resource": "" }
c155224
train
// SetMeterStatus will set the meter status on the given entity tag.
{ "resource": "" }
c155225
train
// StorageName returns the name that is used to store and retrieve the // given version of the juju tools.
{ "resource": "" }
c155226
train
// ReadList returns a List of the tools in store with the given major.minor version. // If minorVersion = -1, then only majorVersion is considered. // If majorVersion is -1, then all tools tarballs are used. // If store contains no such tools, it returns ErrNoMatches.
{ "resource": "" }
c155227
train
// NewHTTPDownloadRequest creates a new HTTP download request // for the given resource. // // Intended for use on the client side.
{ "resource": "" }
c155228
train
// NewZone build an availability zone from the provided name, status // state, and replacement and returns it.
{ "resource": "" }
c155229
train
// Deprecated returns true if the zone has been deprecated.
{ "resource": "" }
c155230
train
// IsMaster reports whether the connected machine // agent lives at the same network address as the primary // mongo server for the replica set. // This call will return an error if the connected // agent is not a machine agent with model-manager // privileges.
{ "resource": "" }
c155231
train
// ClearReboot clears the reboot flag of the machine.
{ "resource": "" }
c155232
train
// NewStateAPI creates a new server-side CrossModelRelationsAPI API facade // backed by global state.
{ "resource": "" }
c155233
train
// NewAPI creates a new server-side CrossModelRelationsAPI API facade backed // by the given interfaces.
{ "resource": "" }
c155234
train
// WatchExternalControllers watches for the addition and removal of external // controller records to the local controller's database.
{ "resource": "" }
c155235
train
// ExternalControllerInfo returns the info for the specified external controllers.
{ "resource": "" }
c155236
train
// SetExternalControllerInfo saves the info for the specified external controllers.
{ "resource": "" }
c155237
train
// Validate validates the instance broker configuration.
{ "resource": "" }
c155238
train
// New creates a new InstanceBroker from the Config
{ "resource": "" }
c155239
train
// ConfigureAvailabilityZone reads the availability zone from the machine and // adds the resulting information to the the manager config.
{ "resource": "" }
c155240
train
// getActionTagByPrefix uses the APIClient to get all ActionTags matching a prefix.
{ "resource": "" }
c155241
train
// getActionTagByPrefix uses the APIClient to get an ActionTag from a prefix.
{ "resource": "" }
c155242
train
// getActionTags converts a slice of params.Entity to a slice of names.ActionTag, and // also populates a slice of strings for the params.Entity.Tag that are not a valid // names.ActionTag.
{ "resource": "" }
c155243
train
// entityToActionTag converts the params.Entity type to a names.ActionTag
{ "resource": "" }
c155244
train
// sessionBase returns the iSCSI sysfs session folder
{ "resource": "" }
c155245
train
// addTarget adds the iscsi target config
{ "resource": "" }
c155246
train
// scheduleOperations schedules the given operations // by calculating the current time once, and then // adding each operation's delay to that time. By // calculating the current time once, we guarantee // that operations with the same delay will be // batched together.
{ "resource": "" }
c155247
train
// DetectCredentials is part of the environs.ProviderCredentials // interface. It attempts to detect subscription IDs from accounts // configured in the Azure CLI.
{ "resource": "" }
c155248
train
// NewMachineAgentCmd creates a Command which handles parsing // command-line arguments and instantiating and running a // MachineAgent.
{ "resource": "" }
c155249
train
// Init is called by the cmd system to initialize the structure for // running.
{ "resource": "" }
c155250
train
// Run instantiates a MachineAgent and runs it.
{ "resource": "" }
c155251
train
// SetFlags adds the requisite flags to run this command.
{ "resource": "" }
c155252
train
// MachineAgentFactoryFn returns a function which instantiates a // MachineAgent given a machineId.
{ "resource": "" }
c155253
train
// NewMachineAgent instantiates a new MachineAgent.
{ "resource": "" }
c155254
train
// upgradeCertificateDNSNames ensure that the controller certificate // recorded in the agent config and also mongo server.pem contains the // DNSNames entries required by Juju.
{ "resource": "" }
c155255
train
// Run runs a machine agent.
{ "resource": "" }
c155256
train
// Restart restarts the agent's service.
{ "resource": "" }
c155257
train
// setupContainerSupport determines what containers can be run on this machine and // initialises suitable infrastructure to support such containers.
{ "resource": "" }
c155258
train
// updateSupportedContainers records in state that a machine can run the specified containers. // It starts a watcher and when a container of a given type is first added to the machine, // the watcher is killed, the machine is set up to be able to start containers of the given type, // and a suitable provisioner is sta...
{ "resource": "" }
c155259
train
// startModelWorkers starts the set of workers that run for every model // in each controller, both IAAS and CAAS.
{ "resource": "" }
c155260
train
// ensureMongoServer ensures that mongo is installed and running, // and ready for opening a state connection.
{ "resource": "" }
c155261
train
// startWorkerAfterUpgrade starts a worker to run the specified child worker // but only after waiting for upgrades to complete.
{ "resource": "" }
c155262
train
// upgradeWaiterWorker runs the specified worker after upgrades have completed.
{ "resource": "" }
c155263
train
// NewContextRelation creates a new context for the given relation unit. // The unit-name keys of members supplies the initial membership.
{ "resource": "" }
c155264
train
// WriteSettings persists all changes made to the unit's relation settings.
{ "resource": "" }
c155265
train
// SetStatus sets the relation's status.
{ "resource": "" }
c155266
train
// stateStepsFor22 returns upgrade steps for Juju 2.2 that manipulate state directly.
{ "resource": "" }
c155267
train
// stepsFor22 returns upgrade steps for Juju 2.2 that only need the API.
{ "resource": "" }
c155268
train
// removeMeterStatusFile removes the meter status file from the agent data directory.
{ "resource": "" }
c155269
train
// DiscoverAuthorizationID returns the OAuth authorization URI for the given // subscription ID. This can be used to determine the AD tenant ID.
{ "resource": "" }
c155270
train
// AuthorizationURITenantID returns the tenant ID portion of the given URL, // which is expected to have come from DiscoverAuthorizationURI.
{ "resource": "" }
c155271
train
// NewUpgrader uses the input function to determine the series that should be // supported, and returns a reference to a new Upgrader that supports it.
{ "resource": "" }
c155272
train
// PerformUpgrade writes Juju binaries and service files that allow the machine // and unit agents to run on the target version of Ubuntu.
{ "resource": "" }
c155273
train
// populateAgents discovers and sets the names of the machine and unit agents. // If there are any other agents determined, a warning is logged to notify that // they are being skipped from the upgrade process.
{ "resource": "" }
c155274
train
// ensureSystemdFiles determines whether re-writing service files to target // systemd is required. If it is, the necessary changes are invoked via the // service manager.
{ "resource": "" }
c155275
train
// ensureAgentBinaries ensures that the jujud binary and links exist in the // right tools path for the target OS series, and that individual agents use // those files.
{ "resource": "" }
c155276
train
// unitStatusHistory returns a list of status history entries for unit agents or workloads.
{ "resource": "" }
c155277
train
// machineStatusHistory returns status history for the given machine.
{ "resource": "" }
c155278
train
// StatusHistory returns a slice of past statuses for several entities.
{ "resource": "" }
c155279
train
// newToolsVersionAvailable will return a string representing a tools // version only if the latest check is newer than current tools.
{ "resource": "" }
c155280
train
// fetchNetworkInterfaces returns maps from machine id to ip.addresses, machine // id to a map of interface names from space names, and machine id to // linklayerdevices. // // All are required to determine a machine's network interfaces configuration, // so we want all or none.
{ "resource": "" }
c155281
train
// fetchAllApplicationsAndUnits returns a map from application name to application, // a map from application name to unit name to unit, and a map from base charm URL to latest URL.
{ "resource": "" }
c155282
train
// fetchConsumerRemoteApplications returns a map from application name to remote application.
{ "resource": "" }
c155283
train
// fetchOfferConnections returns a map from relation id to offer connection.
{ "resource": "" }
c155284
train
// This method exists only to dedup the loaded relations as they will // appear multiple times in context.relations.
{ "resource": "" }
c155285
train
// paramsJobsFromJobs converts state jobs to params jobs.
{ "resource": "" }
c155286
train
// AgentStatus implements UnitStatusGetter.
{ "resource": "" }
c155287
train
// Status implements UnitStatusGetter.
{ "resource": "" }
c155288
train
// processUnitAndAgentStatus retrieves status information for both unit and unitAgents.
{ "resource": "" }
c155289
train
// Return the agent status for the machine.
{ "resource": "" }
c155290
train
// processMachine retrieves version and status information for the given machine. // It also returns deprecated legacy status information.
{ "resource": "" }
c155291
train
// filterStatusData limits what agent StatusData data is passed over // the API. This prevents unintended leakage of internal-only data.
{ "resource": "" }
c155292
train
// stateForRequestUnauthenticated returns a state instance appropriate for // using for the model implicit in the given request // without checking any authentication information.
{ "resource": "" }
c155293
train
// stateForRequestAuthenticated returns a state instance appropriate for // using for the model implicit in the given request. // It also returns the authenticated entity.
{ "resource": "" }
c155294
train
// checkPermissions verifies that given tag passes authentication check. // For example, if only user tags are accepted, all other tags will be denied access.
{ "resource": "" }
c155295
train
// stateForMigration asserts that the incoming connection is from a user that // has admin permissions on the controller model. The method also gets the // model uuid for the model being migrated from a request header, and returns // the state instance for that model.
{ "resource": "" }
c155296
train
// stateForRequestAuthenticatedUser is like stateAndEntityForRequestAuthenticatedUser // but doesn't return the entity.
{ "resource": "" }
c155297
train
// stateAndEntityForRequestAuthenticatedUser is like stateForRequestAuthenticated // except that it also verifies that the authenticated entity is a user.
{ "resource": "" }
c155298
train
// stateForRequestAuthenticatedAgent is like stateForRequestAuthenticated // except that it also verifies that the authenticated entity is an agent.
{ "resource": "" }
c155299
train
// stateForRequestAuthenticatedTag checks that the request is // correctly authenticated, and that the authenticated entity making // the request is of one of the specified kinds.
{ "resource": "" }