Without this patch we did not have a convenient way to find
a template by instance UUID. We could only find virtual
machines by instance UUID, which may or may not be a template.
This patch adds a specific request to obtain the VMware managed
object instance of of a specific template. This is necessary
plumbing for the clone request.
Without this patch we have no way to completely destroy
a server instance. This patch adds a vm_destroy API request
and implements the destroy method on the server model.
The vSphere API requires the server to be in a poweredOff state.
The model action and the request do not verify this is the case
before issuing the command.
This patch implements the start, stop and reboot methods for the Server
model instances.
These server model methods share common names with the AWS server model.
This patch also implements the API requests required to control the
power state of a VMware Virtual Machine.
The requests default to issuing shutdown and reboot commands to the
guest operating system itself. However, if force is set to true for
power_off and reboot, then the VM is powered off or reset at the virtual
hardware layer.
This patch adds two request methods to the compute service for VMware.
First, finding a VM by it's own UUID (from the vmx file) is supported.
This UUID is not guaranteed to be unique so this patch also implements
finding by instance UUID which is guaranteed to be unique.
The server models will primarily use these requests to obtain VM
managed objects to issue commands against.
Without this patch the change set currently has no framework for testing
the Vsphere provider. This patch doesn't actually test anything, but
does add the skeleton code to being testing mocked versions of other
code.
Particularly, we're going to take the approach of completely mocking the
@connection instance variable of the Compute instance. This will allow
us to set expectations and return things from the underlying vmware API
library.
This patch adds a request list_virtual_machines which is responsible for
making an API connection and returning a raw "response" object from the
API.
Model instances of a Server (compute resource) are returned as a
collection through the "all" method. The Fog framework calls all on the
instance of the collection.
Without this patch, no actual API calls are being made through the Fog
layer to the underlying rbvmobi later and ultimately to the vSphere
target API.
This patch adds a simple current_time request which is similar to a
"ping" The layers and API are exercised fully using this simple API
call to retrieve the current time on the remote system.
This provides:
>> Fog::Compute[:vsphere].current_time
Tue Aug 30 20:46:27 UTC 2011
>> Fog::Compute[:vsphere].requests
[:current_time]
Without this patch we were blindly trusting the remote end of our API
connection is who they claim to be. This is an insecure state because
we leave ourselves open to a man in the middle attack.
This patch adds a vsphere_expected_pubkey_hash setting for the Vsphere
provider. This setting is expected to be the SHA256 hex digest string
of the PEM encoded text of the RSA public key.
The first time an end user connects this string is displayed to them in
the error message. They need simply copy and paste it into ~/.fog to
securely connect to the remote end.
For example:
:vspherebadpw:
:vsphere_server: vc01.acme.lan
:vsphere_username: api_login
:vsphere_password: badpassword
:vsphere_expected_pubkey_hash: 431dd...
This patch adds a compute service to fog setting the stage to model
VMware virtual machines using Fog. The patch adds support for:
rdebug -- fog vsphere
>>> connection = Fog::Compute.new(:provider => :vsphere)
The connection to the VMware API is implemented along with
authentication using an username and password. The connection is not
fully secured with this patch because no validation of the SSL
certificate is implemented.
Raw API requests are working with this patch, but none of the API
requests have associated Fog models or collections.