_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c156600
train
// ensureDefaultNetworking ensures that the default LXD bridge exists, // that it is not configured to use IPv6, and that a NIC device exists in // the input profile. // An error is returned if the bridge exists with IPv6 configuration. // If the bridge does not exist, it is created.
{ "resource": "" }
c156601
train
// verifyNICsWithAPI uses the LXD network API to check if one of the input NIC // devices is suitable for LXD to work with Juju.
{ "resource": "" }
c156602
train
// verifyNICsWithConfigFile is recruited for legacy LXD installations. // It checks the LXD bridge configuration file and ensure that one of the input // devices is suitable for LXD to work with Juju.
{ "resource": "" }
c156603
train
// getProfileNICs iterates over the devices in the input profile and returns // any that are of type "nic".
{ "resource": "" }
c156604
train
// InterfaceInfoFromDevices returns a slice of interface info congruent with the // input LXD NIC devices. // The output is used to generate cloud-init user-data congruent with the NICs // that end up in the container.
{ "resource": "" }
c156605
train
// DevicesFromInterfaceInfo uses the input interface info collection to create a // map of network device configuration in the LXD format. // Names for any networks without a known CIDR are returned in a slice.
{ "resource": "" }
c156606
train
// NewApplicationStatusSetter returns a ServiceStatusSetter.
{ "resource": "" }
c156607
train
// SetStatus sets the status on the service given by the unit in args if the unit is the leader.
{ "resource": "" }
c156608
train
// NewStatusSetter returns a new StatusSetter. The GetAuthFunc will be // used on each invocation of SetStatus to determine current // permissions.
{ "resource": "" }
c156609
train
// FindEntity implements state.EntityFinder and returns unit agents.
{ "resource": "" }
c156610
train
// addressFileObject creates a MAASObject pointing to a given file. // Takes out a lock on the storage object to get a consistent view.
{ "resource": "" }
c156611
train
// retrieveFileObject retrieves the information of the named file, // including its download URL and its contents, as a MAASObject. // // This may return many different errors, but specifically, it returns // an error that satisfies errors.IsNotFound if the file did not // exist. // // The function takes out a lock on ...
{ "resource": "" }
c156612
train
// Get is specified in the StorageReader interface.
{ "resource": "" }
c156613
train
// extractFilenames returns the filenames from a "list" operation on the // MAAS API, sorted by name.
{ "resource": "" }
c156614
train
// List is specified in the StorageReader interface.
{ "resource": "" }
c156615
train
// URL is specified in the StorageReader interface.
{ "resource": "" }
c156616
train
// Put is specified in the StorageWriter interface.
{ "resource": "" }
c156617
train
// Remove is specified in the StorageWriter interface.
{ "resource": "" }
c156618
train
// IsUpgradeInProgress returns true if this error is caused // by an upgrade in progress.
{ "resource": "" }
c156619
train
// IsRedirectError returns true if err is caused by a RedirectError.
{ "resource": "" }
c156620
train
// OperationBlockedError returns an error which signifies that // an operation has been blocked; the message should describe // what has been blocked.
{ "resource": "" }
c156621
train
// ServerErrorAndStatus is like ServerError but also // returns an HTTP status code appropriate for using // in a response holding the given error.
{ "resource": "" }
c156622
train
// ServerError returns an error suitable for returning to an API // client, with an error code suitable for various kinds of errors // generated in packages outside the API.
{ "resource": "" }
c156623
train
// NewService returns a new Service type
{ "resource": "" }
c156624
train
// Validate checks the service for invalid values.
{ "resource": "" }
c156625
train
// Installed returns whether the service is installed
{ "resource": "" }
c156626
train
// Exists returns whether the service configuration reflects the // desired state
{ "resource": "" }
c156627
train
// Stop stops the service.
{ "resource": "" }
c156628
train
// Remove deletes the service.
{ "resource": "" }
c156629
train
// usableHostPorts returns hps with unusable and non-unique // host-ports filtered out.
{ "resource": "" }
c156630
train
// UpdateControllerDetailsFromLogin writes any new api addresses and other relevant details // to the client controller file. // Controller may be specified by a UUID or name, and must already exist.
{ "resource": "" }
c156631
train
// NewCredentialManagerAPI creates a new CredentialManager API endpoint on server-side.
{ "resource": "" }
c156632
train
// Resources returns the resources functionality for the current state.
{ "resource": "" }
c156633
train
// ResourcesPersistence returns the resources persistence functionality // for the current state.
{ "resource": "" }
c156634
train
// IsControllerFacade reports whether the given facade name can be accessed // using a controller connection.
{ "resource": "" }
c156635
train
// NewKeyManagerClient returns a keymanager client for the root api endpoint // that the environment command returns.
{ "resource": "" }
c156636
train
// Set implements gnuflag.Value.String.
{ "resource": "" }
c156637
train
// hardwareCharacteristics returns the hardware characteristics of the current // instance
{ "resource": "" }
c156638
train
// Id is defined on the instances.Instance interface.
{ "resource": "" }
c156639
train
// Status is defined on the instances.Instance interface.
{ "resource": "" }
c156640
train
// StorageAttachments returns the storage that was attached in the moment // of instance creation. This storage cannot be detached dynamically. // this is also needed if you wish to determine the free disk index // you can use when attaching a new disk
{ "resource": "" }
c156641
train
// refresh refreshes the instance raw details from the oracle api // this method is mutex protected
{ "resource": "" }
c156642
train
// waitForMachineStatus will ping the machine status until the timeout // duration is reached or an error appeared
{ "resource": "" }
c156643
train
// delete will delete the instance and attempt to cleanup any instance related // resources
{ "resource": "" }
c156644
train
// unusedPublicIps returns a slice of IpReservation that are currently not used
{ "resource": "" }
c156645
train
// associatePublicIP associates a public IP with the current instance
{ "resource": "" }
c156646
train
// dissasociatePublicIps disassociates the public IP address from the current instance. // Optionally, the remove flag will also remove the IP reservation after the IP was disassociated
{ "resource": "" }
c156647
train
// publicAddressesAssociations returns a slice of all IP associations for the current instance
{ "resource": "" }
c156648
train
// Addresses is defined on the instances.Instance interface.
{ "resource": "" }
c156649
train
// OpenPorts is defined on the instances.Instance interface.
{ "resource": "" }
c156650
train
// IngressRules is defined on the instances.Instance interface.
{ "resource": "" }
c156651
train
// NewState creates a new State instance that makes API calls // through the given caller.
{ "resource": "" }
c156652
train
// unitLife returns the lifecycle state of the given unit.
{ "resource": "" }
c156653
train
// Unit returns the unit with the given tag.
{ "resource": "" }
c156654
train
// Machine returns the machine with the given tag.
{ "resource": "" }
c156655
train
// Validate checks the audit logging configuration.
{ "resource": "" }
c156656
train
// NewAgentInfo composes a new AgentInfo for the given essentials.
{ "resource": "" }
c156657
train
// NewMachineAgentInfo returns a new AgentInfo for a machine agent.
{ "resource": "" }
c156658
train
// NewUnitAgentInfo returns a new AgentInfo for a unit agent.
{ "resource": "" }
c156659
train
// ToolsDir returns the path to the agent's tools dir.
{ "resource": "" }
c156660
train
// execArgs returns an unquoted array of service arguments in case we need // them later. One notable place where this is needed, is the windows service // package, where CreateService correctly does quoting of executable path and // individual arguments
{ "resource": "" }
c156661
train
// RemoveAllowed checks if remove block is in place. // Remove block prevents removal of machine, service, unit // and relation from current model.
{ "resource": "" }
c156662
train
// DestroyAllowed checks if destroy block is in place. // Destroy block prevents destruction of current model.
{ "resource": "" }
c156663
train
// checkBlock checks if specified operation must be blocked. // If it does, the method throws specific error that can be examined // to stop operation execution.
{ "resource": "" }
c156664
train
// createManagedDiskVolumes creates volumes with associated managed disks.
{ "resource": "" }
c156665
train
// createManagedDiskVolume creates a managed disk.
{ "resource": "" }
c156666
train
// createUnmanagedDiskVolume updates the provided VirtualMachine's // StorageProfile with the parameters for creating a new unmanaged // data disk. We don't actually interact with the Azure API until // after all changes to the VirtualMachine are made.
{ "resource": "" }
c156667
train
// listBlobs returns a list of blobs in the data-disk container.
{ "resource": "" }
c156668
train
// diskResourceID returns the full resource ID for a disk, given its name.
{ "resource": "" }
c156669
train
// virtualMachines returns a mapping of instance IDs to VirtualMachines and // errors, for each of the specified instance IDs.
{ "resource": "" }
c156670
train
// updateVirtualMachines updates virtual machines in the given map by iterating // through the list of instance IDs in order, and updating each corresponding // virtual machine at most once.
{ "resource": "" }
c156671
train
// blobContainer returns the URL to the named blob container.
{ "resource": "" }
c156672
train
// blobVolumeId returns the volume ID for a blob, and a boolean reporting // whether or not the blob's name matches the scheme we use.
{ "resource": "" }
c156673
train
// getStorageClient returns a new storage client, given an environ config // and a constructor.
{ "resource": "" }
c156674
train
// getStorageAccountKey returns the key for the storage account.
{ "resource": "" }
c156675
train
// storageAccountTemplateResource returns a template resource definition // for creating a storage account.
{ "resource": "" }
c156676
train
// NewModelMachinesWatcher returns a new ModelMachinesWatcher. The // GetAuthFunc will be used on each invocation of WatchUnits to // determine current permissions.
{ "resource": "" }
c156677
train
// WatchModelMachines returns a StringsWatcher that notifies of // changes to the life cycles of the top level machines in the current // model.
{ "resource": "" }
c156678
train
// FindEntity implements state.EntityFinder.
{ "resource": "" }
c156679
train
// Refresh implements state.Authenticator.Refresh.
{ "resource": "" }
c156680
train
// SetPassword implements state.Authenticator.SetPassword // by setting the password on the local user.
{ "resource": "" }
c156681
train
// PasswordValid implements state.Authenticator.PasswordValid.
{ "resource": "" }
c156682
train
// LastLogin implements loginEntity.LastLogin.
{ "resource": "" }
c156683
train
// UpdateLastLogin implements loginEntity.UpdateLastLogin.
{ "resource": "" }
c156684
train
// Restore implements the server side of Backups.Restore.
{ "resource": "" }
c156685
train
// PrepareRestore implements the server side of Backups.PrepareRestore.
{ "resource": "" }
c156686
train
// FinishRestore implements the server side of Backups.FinishRestore.
{ "resource": "" }
c156687
train
// NewMgoStatsCollector returns a new MgoStatsCollector.
{ "resource": "" }
c156688
train
// RescaleService is part of the Backend interface.
{ "resource": "" }
c156689
train
// Validate checks that this config can be used.
{ "resource": "" }
c156690
train
// NewWorker creates and starts a worker that will forward leadership // claims from non-raft-leader machines.
{ "resource": "" }
c156691
train
// AddPackageSource is defined on the PackageSourcesConfig interface.
{ "resource": "" }
c156692
train
// AddPackagePreferences is defined on the PackageSourcesConfig interface.
{ "resource": "" }
c156693
train
// PackagePreferences is defined on the PackageSourcesConfig interface.
{ "resource": "" }
c156694
train
// AddCloudArchiveCloudTools is defined on the AdvancedPackagingConfig // interface.
{ "resource": "" }
c156695
train
// renameAptListFilesCommands takes a new and old mirror string, // and returns a sequence of commands that will rename the files // in aptListsDirectory.
{ "resource": "" }
c156696
train
// Updates proxy settings used when rendering the conf as a script
{ "resource": "" }
c156697
train
// Run changes the version proposed for the juju envtools.
{ "resource": "" }
c156698
train
// initVersions collects state relevant to an upgrade decision. The returned // agent and client versions, and the list of currently available tools, will // always be accurate; the chosen version, and the flag indicating development // mode, may remain blank until uploadTools or validate is called.
{ "resource": "" }
c156699
train
// validate ensures an upgrade can be done using the chosen agent version. // If validate returns no error, the environment agent-version can be set to // the value of the chosen agent field.
{ "resource": "" }