public class VagrantPlatform extends VirtualPlatform
Platform implementation that represents
an O/S running in a virtual machine managed by the Vagrant.
Copyright (c) 2014. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_VAGRANT_COMMAND
The default command used to run the Vagrant command line interface.
|
| Constructor and Description |
|---|
VagrantPlatform(String name,
VagrantFileBuilder builder,
int port,
com.oracle.bedrock.Option... options)
Construct a new
VagrantPlatform. |
VagrantPlatform(String name,
VagrantFileBuilder builder,
com.oracle.bedrock.Option... options)
Construct a new
VagrantPlatform. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
close(com.oracle.bedrock.Option... closeOptions) |
protected Properties |
detectSSH()
Detect the SSH settings for the NAT port forwarding that Vagrant
has configured on the VM and set them into this
VagrantPlatform. |
protected void |
execute(com.oracle.bedrock.OptionsByType optionsByType)
Execute the application defined by the specified
OptionsByType. |
protected com.oracle.bedrock.OptionsByType |
getDefaultOptions()
Options the default
OptionsByType to use when launching Vagrant. |
static String |
getDefaultVagrantCommand()
Get the default Vagrant command to use to execute the Vagrant CLI commands.
|
String |
getPublicHostName()
Obtain the host name of the public network interface on the VM
|
String |
getVagrantCommand()
Obtain the command used to run the Vagrant command line interface.
|
File |
getWorkingDirectory()
Obtain the location of this
VagrantPlatform's VagrantFile. |
void |
setVagrantCommand(String vagrantCommand)
Set the command used to run the Vagrant command line interface.
|
void |
start()
Start this
VagrantPlatform. |
getAddress, getApplicationLauncher, getAuthentication, getOperatingSystem, getPort, getUserNamegetName, getOptions, launchadd, add, get, getInstancesOf, has, remove, removeAllFeaturesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final String DEFAULT_VAGRANT_COMMAND
public VagrantPlatform(String name, VagrantFileBuilder builder, com.oracle.bedrock.Option... options)
VagrantPlatform.name - the name of this VagrantPlatformbuilder - the VagrantFileBuilder to use to build the
Vagranfile for the VMoptions - the Options for the VagrantPlatformpublic VagrantPlatform(String name, VagrantFileBuilder builder, int port, com.oracle.bedrock.Option... options)
VagrantPlatform.name - the name of this VagrantPlatformbuilder - the VagrantFileBuilder to use to build
the Vagrantfile for the VMport - the remote port that will be used to SSH into
this VirtualPlatformoptions - the Options for the VagrantPlatformpublic String getVagrantCommand()
public void setVagrantCommand(String vagrantCommand)
vagrantCommand - the command used to run the Vagrant command
line interfacepublic File getWorkingDirectory()
VagrantPlatform's VagrantFile.VagrantPlatform's VagrantFilepublic String getPublicHostName()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class VirtualPlatformIOExceptionpublic void close(com.oracle.bedrock.Option... closeOptions)
throws IOException
close in class VirtualPlatformIOExceptionpublic void start()
VagrantPlatform.
When this method returns the virtual machine this VagrantPlatform
represents will be in a running state.protected Properties detectSSH()
VagrantPlatform.protected void execute(com.oracle.bedrock.OptionsByType optionsByType)
OptionsByType.optionsByType - the OptionsByTypeprotected com.oracle.bedrock.OptionsByType getDefaultOptions()
OptionsByType to use when launching Vagrant.OptionsByTypepublic static String getDefaultVagrantCommand()
Copyright © 2017. All rights reserved.