Add Start, Stop, Pause, Unpause, Suspend, & Resume
Fixes #190.
These six functions, of which Start and Stop are undocumented on
OpenStack's API reference, should facilitate an easier method to place a
server into a suspended-animation state.
Pausing a server will cease its operation, but will hold its state in
the hypervisor's RAM. Suspending a server will cease the operation and
write the results to disk or other non-volatile medium. No idea
what-so-ever what Stop does. Use Stop at your own risk.
diff --git a/interfaces.go b/interfaces.go
index 4c7dbee..d73f11d 100644
--- a/interfaces.go
+++ b/interfaces.go
@@ -244,4 +244,29 @@
// GetSGRule obtains information for a specified security group rule.
// This method only works if the provider supports the os-security-groups-default-rules extension.
GetSGRule(string) (*SGRule, error)
+
+ // Pause stores the state of the server in RAM. A paused instance continues to run in a frozen state.
+ Pause(id string) error
+
+ // Unpause restores normal behavior of a previously paused server.
+ Unpause(id string) error
+
+ // Suspend stores the state of the server on disk or other non-volatile medium.
+ // Administrative users might suspend an infrequently used instance or suspend an instance to perform system maintenance.
+ // Suspending an instance is similar to placing a device in hibernation;
+ // memory and vCPUs become available to create other instances.
+ Suspend(id string) error
+
+ // Resume restores normal behavior of a previously suspended server.
+ Resume(id string) error
+
+ // Start restores a previously stopped server to normal operation.
+ // WARNING: This function depends on a Nova action which remains undocumented on the OpenStack API Reference website,
+ // and may be deprecated in favor of Pause/Unpause, or Suspend/Resume.
+ Start(id string) error
+
+ // Stop stops a server.
+ // WARNING: This function depends on a Nova action which remains undocumented on the OpenStack API Reference website,
+ // and may be deprecated in favor of Pause/Unpause, or Suspend/Resume.
+ Stop(id string) error
}