_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c154400
train
// Import takes a serialized model and imports it into the target // controller.
{ "resource": "" }
c154401
train
// Abort removes all data relating to a previously imported model.
{ "resource": "" }
c154402
train
// UploadTools uploads tools at the specified location to the API server over HTTPS // for the specified model.
{ "resource": "" }
c154403
train
// UploadResource uploads a resource to the migration endpoint.
{ "resource": "" }
c154404
train
// SetUnitResource sets the metadata for a particular unit resource.
{ "resource": "" }
c154405
train
// OpenLogTransferStream connects to the migration logtransfer // endpoint on the target controller and returns a stream that JSON // logs records can be fed into. The objects written should be params.LogRecords.
{ "resource": "" }
c154406
train
// CACert returns the CA certificate associated with // the connection.
{ "resource": "" }
c154407
train
// Name returns the name of this unit.
{ "resource": "" }
c154408
train
// Application returns the application name of this unit.
{ "resource": "" }
c154409
train
// MachineId returns the ID of the machine hosting this unit.
{ "resource": "" }
c154410
train
// Subordinate returns a bool indicating whether this unit is a subordinate.
{ "resource": "" }
c154411
train
// Principal returns the name of the principal unit for the same application.
{ "resource": "" }
c154412
train
// CharmURL returns the charm URL for this unit's application.
{ "resource": "" }
c154413
train
// OneError returns the error from the result // of a bulk operation on a single value.
{ "resource": "" }
c154414
train
// Combine returns one error from the result which is an accumulation of the // errors. If there are no errors in the result, the return value is nil. // Otherwise the error values are combined with new-line characters.
{ "resource": "" }
c154415
train
// NewPublicFacade creates a public API facade for resources. It is // used for API registration.
{ "resource": "" }
c154416
train
// NewFacade returns a new resoures API facade.
{ "resource": "" }
c154417
train
// ListResources returns the list of resources for the given application.
{ "resource": "" }
c154418
train
// resourcesFromCharmstore gets the info for the charm's resources in // the charm store. If the charm URL has a revision then that revision's // resources are returned. Otherwise the latest info for each of the // resources is returned.
{ "resource": "" }
c154419
train
// resolveStoreResource selects the resource info to use. It decides // between the provided and latest info based on the revision.
{ "resource": "" }
c154420
train
// ecfg returns the environment's maasModelConfig, and protects it with a // mutex.
{ "resource": "" }
c154421
train
// allArchitectures2 uses the MAAS2 controller to get architectures from boot // resources.
{ "resource": "" }
c154422
train
// allArchitectureWithFallback queries MAAS for all of the boot-images // across all registered nodegroups and collapses them down to unique // architectures.
{ "resource": "" }
c154423
train
// getNodegroups returns the UUID corresponding to each nodegroup // in the MAAS installation.
{ "resource": "" }
c154424
train
// nodegroupBootImages returns the set of boot-images for the specified nodegroup.
{ "resource": "" }
c154425
train
// getCapabilities asks the MAAS server for its capabilities, if // supported by the server.
{ "resource": "" }
c154426
train
// getMAASClient returns a MAAS client object to use for a request, in a // lock-protected fashion.
{ "resource": "" }
c154427
train
// acquireNode2 allocates a machine from MAAS2.
{ "resource": "" }
c154428
train
// acquireNode allocates a node from the MAAS.
{ "resource": "" }
c154429
train
// startNode installs and boots a node.
{ "resource": "" }
c154430
train
// newCloudinitConfig creates a cloudinit.Config structure suitable as a base // for initialising a MAAS node.
{ "resource": "" }
c154431
train
// Instances returns the instances.Instance objects corresponding to the given // slice of instance.Id. The error is ErrNoInstances if no instances // were found.
{ "resource": "" }
c154432
train
// instances calls the MAAS API to list nodes matching the given filter.
{ "resource": "" }
c154433
train
// subnetsFromNode fetches all the subnets for a specific node.
{ "resource": "" }
c154434
train
// subnetFromJson populates a network.SubnetInfo from a gomaasapi.JSONObject // representing a single subnet. This can come from either the subnets api // endpoint or the node endpoint.
{ "resource": "" }
c154435
train
// fetchAllSubnets calls the MAAS subnets API to get all subnets and returns the // JSON response or an error. If capNetworkDeploymentUbuntu is not available, an // error satisfying errors.IsNotSupported will be returned.
{ "resource": "" }
c154436
train
// subnetToSpaceIds fetches the spaces from MAAS and builds a map of subnets to // space ids.
{ "resource": "" }
c154437
train
// Spaces returns all the spaces, that have subnets, known to the provider. // Space name is not filled in as the provider doesn't know the juju name for // the space.
{ "resource": "" }
c154438
train
// Subnets returns basic information about the specified subnets known // by the provider for the specified instance. subnetIds must not be // empty. Implements NetworkingEnviron.Subnets.
{ "resource": "" }
c154439
train
// AllInstances returns all the instances.Instance in this provider.
{ "resource": "" }
c154440
train
// Storage is defined by the Environ interface.
{ "resource": "" }
c154441
train
// AdoptResources updates all the instances to indicate they // are now associated with the specified controller.
{ "resource": "" }
c154442
train
// AreSpacesRoutable implements environs.NetworkingEnviron.
{ "resource": "" }
c154443
train
// Get the domains managed by MAAS. Currently we only need the name of the domain. If more information is needed // This function can be updated to parse and return a structure. Client code would need to be updated.
{ "resource": "" }
c154444
train
// RegisterUserImageDataSourceFunc registers an ImageDataSourceFunc // with the specified id at the start of the search path, overwriting // any function previously registered with the same id.
{ "resource": "" }
c154445
train
// UnregisterImageDataSourceFunc unregisters an ImageDataSourceFunc // with the specified id.
{ "resource": "" }
c154446
train
// ImageMetadataSources returns the sources to use when looking for // simplestreams image id metadata for the given stream.
{ "resource": "" }
c154447
train
// environmentDataSources returns simplestreams datasources for the environment // by calling the functions registered in RegisterImageDataSourceFunc. // The datasources returned will be in the same order the functions were registered.
{ "resource": "" }
c154448
train
// UnregisterProvider removes the named provider from the list of available providers.
{ "resource": "" }
c154449
train
// RegisterProvider registers a new environment provider. Name gives the name // of the provider, and p the interface to that provider. // // RegisterProvider will panic if the provider name or any of the aliases // are registered more than once. // The return function can be used to unregister the provider and is used...
{ "resource": "" }
c154450
train
// Open connects to a remote syslog host and wraps that connection // in a new client.
{ "resource": "" }
c154451
train
// OpenForSender connects to a remote syslog host and wraps that // connection in a new client.
{ "resource": "" }
c154452
train
// Close closes the client's connection.
{ "resource": "" }
c154453
train
// Send sends the record to the remote syslog host.
{ "resource": "" }
c154454
train
// CollectionFromName returns a named collection on the specified database, // initialised with a new session. Also returned is a close function which // must be called when the collection is no longer required.
{ "resource": "" }
c154455
train
// Find is part of the Collection interface.
{ "resource": "" }
c154456
train
// Pipe is part of the Collection interface
{ "resource": "" }
c154457
train
// FindId is part of the Collection interface.
{ "resource": "" }
c154458
train
// NewListCredentialsCommand returns a command to list cloud credentials.
{ "resource": "" }
c154459
train
// formatCredentialsTabular writes a tabular summary of cloud information.
{ "resource": "" }
c154460
train
// NewFacade wraps NewInstancePollerAPI for facade registration.
{ "resource": "" }
c154461
train
// NewInstancePollerAPI creates a new server-side InstancePoller API // facade.
{ "resource": "" }
c154462
train
// ProviderAddresses returns the list of all known provider addresses // for each given entity. Only machine tags are accepted.
{ "resource": "" }
c154463
train
// SetProviderAddresses updates the list of known provider addresses // for each given entity. Only machine tags are accepted.
{ "resource": "" }
c154464
train
// SetInstanceStatus updates the instance status for each given // entity. Only machine tags are accepted.
{ "resource": "" }
c154465
train
// AdminFacadeDetails returns information on the Admin facade provided // at login time. The Facade field of the returned slice elements will // be nil.
{ "resource": "" }
c154466
train
// isKnownStorageAccountType reports whether or not the given string identifies // a known storage account type.
{ "resource": "" }
c154467
train
// canonicalLocation returns the canonicalized location string. This involves // stripping whitespace, and lowercasing. The ARM APIs do not support embedded // whitespace, whereas the old Service Management APIs used to; we allow the // user to provide either, and canonicalize them to one form that ARM allows.
{ "resource": "" }
c154468
train
// NewIngressRule returns an IngressRule for the specified port // range. If no explicit source ranges are specified, there is no // restriction from where incoming traffic originates.
{ "resource": "" }
c154469
train
// MustNewIngressRule returns an IngressRule for the specified port // range. If no explicit source ranges are specified, there is no // restriction from where incoming traffic originates. // The method will panic if there is an error.
{ "resource": "" }
c154470
train
// NewOpenIngressRule returns an IngressRule for the specified port // range. There is no restriction from where incoming traffic originates.
{ "resource": "" }
c154471
train
// String is the string representation of IngressRule.
{ "resource": "" }
c154472
train
// removeContainerRefOps returns the txn.Op's necessary to remove a machine container record. // These include removing the record itself and updating the host machine's children property.
{ "resource": "" }
c154473
train
// ParentId returns the id of the host machine if machineId a container id, or "" // if machineId is not for a container.
{ "resource": "" }
c154474
train
// ContainerTypeFromId returns the container type if machineId is a container id, or "" // if machineId is not for a container.
{ "resource": "" }
c154475
train
// NestingLevel returns how many levels of nesting exist for a machine id.
{ "resource": "" }
c154476
train
// createEndpointBindingsOp returns the op needed to create new endpoint // bindings using the optional givenMap and the specified charm metadata to for // determining defaults and to validate the effective bindings.
{ "resource": "" }
c154477
train
// updateEndpointBindingsOp returns an op that merges the existing bindings with // givenMap, using newMeta to validate the merged bindings, and asserting the // existing ones haven't changed in the since we fetched them.
{ "resource": "" }
c154478
train
// removeEndpointBindingsOp returns an op removing the bindings for the given // key, without asserting they exist in the first place.
{ "resource": "" }
c154479
train
// DefaultNetworks is part of the Networking interface.
{ "resource": "" }
c154480
train
// NetworkInterfaces is part of the Networking interface
{ "resource": "" }
c154481
train
// getExternalNeutronNetworksByAZ returns all external networks within the // given availability zone. If azName is empty, return all external networks.
{ "resource": "" }
c154482
train
// Subnets returns basic information about the specified subnets known // by the provider for the specified instance or list of ids. subnetIds can be // empty, in which case all known are returned.
{ "resource": "" }
c154483
train
// UseTargetServer returns a new Server based on the input target node name. // It is intended for use when operations must target specific nodes in a // cluster.
{ "resource": "" }
c154484
train
// NewMockEntityFinder creates a new mock instance
{ "resource": "" }
c154485
train
// NewMockEntity creates a new mock instance
{ "resource": "" }
c154486
train
// Tag indicates an expected call of Tag
{ "resource": "" }
c154487
train
// NewMockLifer creates a new mock instance
{ "resource": "" }
c154488
train
// checkForExistingDevice checks to see if we've already registered a device // with this name, and if its information is appropriately populated. If we // have, then we just return the existing interface info. If we find it, but // it doesn't match, then we ask MAAS to remove it, which should cause the // calling code...
{ "resource": "" }
c154489
train
// formatShowTabular returns a tabular summary of remote applications or // errors out if parameter is not of expected type.
{ "resource": "" }
c154490
train
// formatOfferedEndpointsTabular returns a tabular summary of offered applications' endpoints.
{ "resource": "" }
c154491
train
// queryCloud asks the user to choose a cloud.
{ "resource": "" }
c154492
train
// queryRegion asks the user to pick a region of the ones passed in. The first // region in the list will be the default.
{ "resource": "" }
c154493
train
// NextOp implements resolver.Resolver.
{ "resource": "" }
c154494
train
// NewRelations returns a new Relations instance.
{ "resource": "" }
c154495
train
// NextHook implements Relations.
{ "resource": "" }
c154496
train
// nextRelationHook returns the next hook op that should be executed in the // relation characterised by the supplied local and remote state; or an error // if the states do not refer to the same relation; or ErrRelationUpToDate if // no hooks need to be executed.
{ "resource": "" }
c154497
train
// Name is part of the Relations interface.
{ "resource": "" }
c154498
train
// PrepareHook is part of the Relations interface.
{ "resource": "" }
c154499
train
// CommitHook is part of the Relations interface.
{ "resource": "" }