_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c165100 | train | // authorizedKeysLine serializes key for inclusion in an OpenSSH
// authorized_keys file. The return value ends without newline so
// a comment can be appended to the end. | {
"resource": ""
} | ||
c165101 | train | // Raw converts a Template struct back into the raw Packer template structure | {
"resource": ""
} | ||
c165102 | train | // MarshalJSON conducts the necessary flattening of the Builder struct
// to provide valid Packer template JSON | {
"resource": ""
} | ||
c165103 | train | // MarshalJSON conducts the necessary flattening of the PostProcessor struct
// to provide valid Packer template JSON | {
"resource": ""
} | ||
c165104 | train | // MarshalJSON conducts the necessary flattening of the Provisioner struct
// to provide valid Packer template JSON | {
"resource": ""
} | ||
c165105 | train | // Skip says whether or not to skip the build with the given name. | {
"resource": ""
} | ||
c165106 | train | // Validate validates that the OnlyExcept settings are correct for a thing. | {
"resource": ""
} | ||
c165107 | train | // Make sure custom vmx template exists and that data can be read from it | {
"resource": ""
} | ||
c165108 | train | // Copies a file by copying the contents of the file to another place. | {
"resource": ""
} | ||
c165109 | train | // DirToBox takes the directory and compresses it into a Vagrant-compatible
// box. This function does not perform checks to verify that dir is
// actually a proper box. This is an expected precondition. | {
"resource": ""
} | ||
c165110 | train | // WriteMetadata writes the "metadata.json" file for a Vagrant box. | {
"resource": ""
} | ||
c165111 | train | // Generates a time ordered UUID. Top 32 bits are a timestamp,
// bottom 96 are random. | {
"resource": ""
} | ||
c165112 | train | // Funcs returns the functions that can be used for interpolation given
// a context. | {
"resource": ""
} | ||
c165113 | train | // Run fn until context is cancelled up until StartTimeout time has passed. | {
"resource": ""
} | ||
c165114 | train | // generate a password that is acceptable to Azure
// Three of the four items must be met.
// 1. Contains an uppercase character
// 2. Contains a lowercase character
// 3. Contains a numeric digit
// 4. Contains a special character | {
"resource": ""
} | ||
c165115 | train | // If in the target folder a virtual machine or template already exists
// it will be removed to maintain consistency | {
"resource": ""
} | ||
c165116 | train | // Run runs the step required to create an external switch. Depending on
// the connectivity of the host machine, the external switch will allow the
// build VM to connect to the outside world. | {
"resource": ""
} | ||
c165117 | train | // removeBase will take a regular os.PathSeparator-separated path and remove the
// prefix directory base from it. Both paths are converted to their absolute
// formats before the stripping takes place. | {
"resource": ""
} | ||
c165118 | train | // NewDriver returns a new driver implementation for this version of Parallels
// Desktop, or an error if the driver couldn't be initialized. | {
"resource": ""
} | ||
c165119 | train | // TrackProgress starts a pair of ProgressTrackingClient and ProgressProgressTrackingServer
// that will send the size of each read bytes of stream.
// In order to track an operation on the terminal side. | {
"resource": ""
} | ||
c165120 | train | // SSHHost returns a function that can be given to the SSH communicator
// for determining the SSH address based on the instance DNS name. | {
"resource": ""
} | ||
c165121 | train | // Run starts the brokering and should be executed in a goroutine, since it
// blocks forever, or until the session closes. | {
"resource": ""
} | ||
c165122 | train | // LineReader takes an io.Reader and produces the contents of the reader on the
// returned channel. Internally bufio.NewScanner is used, io.ScanLines parses
// lines and returns them without carriage return. Scan can panic if the split
// function returns too many empty tokens without advancing the input.
//
// The ch... | {
"resource": ""
} | ||
c165123 | train | // tokenFromFile returns a token from the specified file if it is found, otherwise
// returns nil. Any error retrieving or creating the token is returned as an error. | {
"resource": ""
} | ||
c165124 | train | // tokenFromDeviceFlow prints a message to the screen for user to take action to
// consent application on a browser and in the meanwhile the authentication
// endpoint is polled until user gives consent, denies or the flow times out.
// Returned token must be saved. | {
"resource": ""
} | ||
c165125 | train | // tokenCachePath returns the full path the OAuth 2.0 token should be saved at
// for given tenant ID. | {
"resource": ""
} | ||
c165126 | train | // mkTokenCallback returns a callback function that can be used to save the
// token initially or register to the Azure SDK to be called when the token is
// refreshed. | {
"resource": ""
} | ||
c165127 | train | // FindTenantID figures out the AAD tenant ID of the subscription by making an
// unauthenticated request to the Get Subscription Details endpoint and parses
// the value from WWW-Authenticate header. | {
"resource": ""
} | ||
c165128 | train | // bmpString returns s encoded in UCS-2 with a zero terminator. | {
"resource": ""
} | ||
c165129 | train | // Clean up image name by replacing invalid characters with "-"
// Names are not allowed to end in '.', '-', or '_' and are trimmed. | {
"resource": ""
} | ||
c165130 | train | // formatDuration formats the given time.Duration into an ISO8601
// duration string. | {
"resource": ""
} | ||
c165131 | train | // Run is where the actual build should take place. It takes a Build and a Ui. | {
"resource": ""
} | ||
c165132 | train | // Run executes the Packer build step that tears down a GCE instance. | {
"resource": ""
} | ||
c165133 | train | // Deleting the instance does not remove the boot disk. This cleanup removes
// the disk. | {
"resource": ""
} | ||
c165134 | train | // Creates a new packer.Communicator implementation over SSH. This takes
// an already existing TCP connection and SSH configuration. | {
"resource": ""
} | ||
c165135 | train | // Prepare sets the default value of "PrlctlPost" property. | {
"resource": ""
} | ||
c165136 | train | // DeleteImage mocks deleting a custom image. | {
"resource": ""
} | ||
c165137 | train | // Run implements the packer.Builder interface. | {
"resource": ""
} | ||
c165138 | train | // NewArtifact returns a vagrant artifact containing the .box file | {
"resource": ""
} | ||
c165139 | train | // Run runs the compaction of the virtual disk attached to the VM. | {
"resource": ""
} | ||
c165140 | train | // winrmConfig returns the WinRM configuration. | {
"resource": ""
} | ||
c165141 | train | // Import creates a clone of the source VM and reassigns the MAC address if needed. | {
"resource": ""
} | ||
c165142 | train | // CompactDisk performs the compaction of the specified virtual disk image. | {
"resource": ""
} | ||
c165143 | train | // DeviceAddCDROM adds a virtual CDROM device and attaches the specified image. | {
"resource": ""
} | ||
c165144 | train | // DiskPath returns a full path to the first virtual disk drive. | {
"resource": ""
} | ||
c165145 | train | // IsRunning determines whether the VM is running or not. | {
"resource": ""
} | ||
c165146 | train | // Stop forcibly stops the VM. | {
"resource": ""
} | ||
c165147 | train | // Version returns the version of Parallels Desktop installed on that host. | {
"resource": ""
} | ||
c165148 | train | // MAC returns the MAC address of the VM's first network interface. | {
"resource": ""
} | ||
c165149 | train | // removes overlap between the end of a and the start of b and
// glues them together | {
"resource": ""
} | ||
c165150 | train | // realMain is executed from main and returns the exit status to exit with. | {
"resource": ""
} | ||
c165151 | train | // wrappedMain is called only when we're wrapped by panicwrap and
// returns the exit status to exit with. | {
"resource": ""
} | ||
c165152 | train | // excludeHelpFunc filters commands we don't want to show from the list of
// commands displayed in packer's help text. | {
"resource": ""
} | ||
c165153 | train | // extractMachineReadable checks the args for the machine readable
// flag and returns whether or not it is on. It modifies the args
// to remove this flag. | {
"resource": ""
} | ||
c165154 | train | // ValidateRegion returns an nil if the regions are valid
// and exists; otherwise an error.
// ValidateRegion calls ec2conn.DescribeRegions to get the list of
// regions available to this account. | {
"resource": ""
} | ||
c165155 | train | // Verify raises an error if the builder could not be used on that host machine. | {
"resource": ""
} | ||
c165156 | train | // workstationProgramFilesPaths returns a list of paths that are eligible
// to contain program files we may want just as vmware.exe. | {
"resource": ""
} | ||
c165157 | train | // workstationDataFilePaths returns a list of paths that are eligible
// to contain data files we may want such as vmnet NAT configuration files. | {
"resource": ""
} | ||
c165158 | train | // Get a login token for Amazon AWS ECR. Returns username and password
// or an error. | {
"resource": ""
} | ||
c165159 | train | // NewRawConfigurationProvider will create a rawConfigurationProvider. | {
"resource": ""
} | ||
c165160 | train | // Client for AlicloudClient | {
"resource": ""
} | ||
c165161 | train | // ProxyConnectFunc is a convenience method for returning a function
// that connects to a host using SOCKS5 proxy | {
"resource": ""
} | ||
c165162 | train | // Listen tries to Listen to a random open TCP port in the [min, max) range
// until ctx is cancelled.
// Listen uses net.ListenConfig.Listen internally. | {
"resource": ""
} | ||
c165163 | train | // Creates a null packer.Communicator implementation. This takes
// an already existing configuration. | {
"resource": ""
} | ||
c165164 | train | // unmarshal calls asn1.Unmarshal, but also returns an error if there is any
// trailing data after unmarshalling. | {
"resource": ""
} | ||
c165165 | train | // Decode extracts a certificate and private key from pfxData. This function
// assumes that there is only one certificate and only one private key in the
// pfxData. | {
"resource": ""
} | ||
c165166 | train | // Decodes configuration in JSON format from the given io.Reader into
// the config object pointed to. | {
"resource": ""
} | ||
c165167 | train | // Discover discovers plugins.
//
// Search the directory of the executable, then the plugins directory, and
// finally the CWD, in that order. Any conflicts will overwrite previously
// found plugins, in that order.
// Hence, the priority order is the reverse of the search order - i.e., the
// CWD has the highest prio... | {
"resource": ""
} | ||
c165168 | train | // This is a proper packer.BuilderFunc that can be used to load packer.Builder
// implementations from the defined plugins. | {
"resource": ""
} | ||
c165169 | train | // This is a proper implementation of packer.HookFunc that can be used
// to load packer.Hook implementations from the defined plugins. | {
"resource": ""
} | ||
c165170 | train | // This is a proper packer.PostProcessorFunc that can be used to load
// packer.PostProcessor implementations from defined plugins. | {
"resource": ""
} | ||
c165171 | train | // This is a proper packer.ProvisionerFunc that can be used to load
// packer.Provisioner implementations from defined plugins. | {
"resource": ""
} | ||
c165172 | train | // Run executes a googlecompute Packer build and returns a packer.Artifact
// representing a GCE machine image. | {
"resource": ""
} | ||
c165173 | train | // Destroy destroys the GCE image represented by the artifact. | {
"resource": ""
} | ||
c165174 | train | // AvailableDevice finds an available device and returns it. Note that
// you should externally hold a flock or something in order to guarantee
// that this device is available across processes. | {
"resource": ""
} | ||
c165175 | train | // DecompressOva takes an ova file and decompresses it into the target
// directory. | {
"resource": ""
} | ||
c165176 | train | // Used to set variables which we need to access later in the build, where
// state bag and config information won't work | {
"resource": ""
} | ||
c165177 | train | // Prepare sets the default values for SSH communicator properties. | {
"resource": ""
} | ||
c165178 | train | // format a Azure Error Response by recursing through the JSON structure.
//
// Errors may contain nested errors, which are JSON documents that have been
// serialized and escaped. Keep following this nesting all the way down... | {
"resource": ""
} | ||
c165179 | train | // Parameters that are only known at runtime after querying Azure. | {
"resource": ""
} | ||
c165180 | train | // Config returns a valid aws.Config object for access to AWS services, or
// an error if the authentication and region couldn't be resolved | {
"resource": ""
} | ||
c165181 | train | // This method will build a network and subnetwork ID from the provided
// instance config, and return them in that order. | {
"resource": ""
} | ||
c165182 | train | // Destroy deletes the custom image associated with the artifact. | {
"resource": ""
} | ||
c165183 | train | // This reads the VMware installation path from the Windows registry. | {
"resource": ""
} | ||
c165184 | train | // playerProgramFilesPaths returns a list of paths that are eligible
// to contain program files we may want just as vmware.exe. | {
"resource": ""
} | ||
c165185 | train | // playerDataFilePaths returns a list of paths that are eligible
// to contain data files we may want such as vmnet NAT configuration files. | {
"resource": ""
} | ||
c165186 | train | // Clean up image name by replacing invalid characters with "-"
// and converting upper cases to lower cases | {
"resource": ""
} | ||
c165187 | train | // scanUnixLine is a bufio.Scanner SplitFunc. It tokenizes on lines, but
// only returns unix-style lines. So even if the line is "one\r\n", the
// token returned will be "one\n". | {
"resource": ""
} | ||
c165188 | train | // Run executes a yandex Packer build and returns a packer.Artifact
// representing a Yandex.Cloud compute image. | {
"resource": ""
} | ||
c165189 | train | // UpdateVMX, adds the VNC port to the VMX data. | {
"resource": ""
} | ||
c165190 | train | // ParseVMX parses the keys and values from a VMX file and returns
// them as a Go map. | {
"resource": ""
} | ||
c165191 | train | // EncodeVMX takes a map and turns it into valid VMX contents. | {
"resource": ""
} | ||
c165192 | train | // WriteVMX takes a path to a VMX file and contents in the form of a
// map and writes it out. | {
"resource": ""
} | ||
c165193 | train | // Render is shorthand for constructing an I and calling Render. | {
"resource": ""
} | ||
c165194 | train | // Validate is shorthand for constructing an I and calling Validate. | {
"resource": ""
} | ||
c165195 | train | // Render renders the interpolation with the given context. | {
"resource": ""
} | ||
c165196 | train | // Validate validates that the template is syntactically valid. | {
"resource": ""
} | ||
c165197 | train | // Builds the base register opts with architecture, name, root block device, mappings, virtualizationtype | {
"resource": ""
} | ||
c165198 | train | // FileSigner returns an ssh.Signer for a key file. | {
"resource": ""
} | ||
c165199 | train | // Run executes the Packer build step that creates a GCE instance. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.