OpenStudioCore:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Protected Types | Protected Member Functions | List of all members
openstudio::VagrantProvider Class Reference

#include <VagrantProvider.hpp>

+ Inheritance diagram for openstudio::VagrantProvider:

Public Member Functions

Constructor
 VagrantProvider ()
 default constructor, loads settings More...
 
Destructors
virtual ~VagrantProvider ()
 virtual destructor More...
 
- Public Member Functions inherited from openstudio::CloudProvider
virtual ~CloudProvider ()
 virtual destructor More...
 
std::string type () const
 returns the name of this type of cloud provider, e.g. 'AWSProvider' More...
 
unsigned numWorkers () const
 returns the number of workers to be requested More...
 
CloudSettings settings () const
 returns the current settings More...
 
bool setSettings (const CloudSettings &settings)
 returns true if can assign settings clears errors and warnings More...
 
CloudSession session () const
 returns the current session More...
 
bool setSession (const CloudSession &session)
 attempts to restore a previously started session returns false if the session does not have serverUrl or workerUrls specified this call does not check that the session is still valid or that the server can be reached clears errors and warnings More...
 
bool lastInternetAvailable () const
 returns the last state of the internet available check More...
 
bool lastServiceAvailable () const
 returns the last state of the service available check More...
 
bool lastValidateCredentials () const
 returns the last state of the validate credentials check More...
 
bool lastResourcesAvailableToStart () const
 returns the last state of the resources available to start check More...
 
bool serverStarted () const
 returns true if requestStartServer has been called relies on local state variable, not network requests this will return true before serverRunning() returns true More...
 
bool workersStarted () const
 returns true if requestStartWorkers has been called relies on local state variable, not network requests this will return true before serverRunning() returns true More...
 
bool lastServerRunning () const
 returns the last state of requestServerRunning More...
 
bool lastWorkersRunning () const
 returns the last state of requestWorkersRunning More...
 
bool lastRunning () const
 returns true if lastServerRunning and lastWorkersRunning More...
 
bool terminateStarted () const
 returns true if requestTerminate has been called relies on local state variable, not network requests this will return true before serverRunning() returns true More...
 
bool lastTerminateCompleted () const
 returns the last state of requestTerminateCompleted More...
 
std::vector< std::string > errors () const
 returns errors generated by the last operation More...
 
std::vector< std::string > warnings () const
 returns warnings generated by the last operation More...
 
bool internetAvailable (int msec=30000)
 returns true if this computer is connected to the internet clears errors and warnings More...
 
bool serviceAvailable (int msec=30000)
 returns true if the cloud service can be reached (e.g. More...
 
bool validateCredentials (int msec=30000)
 returns true if the cloud service validates user credentials blocking call, clears errors and warnings More...
 
bool resourcesAvailableToStart (int msec=30000)
 returns true if the cloud service has sufficient resources to start the requested instances blocking call, clears errors and warnings More...
 
bool waitForServer (int msec=300000)
 waits up to msec milliseconds and returns true if server url becomes available in that time call requestStartServer before calling this function More...
 
bool waitForWorkers (int msec=300000)
 waits up to msec milliseconds and returns true if worker urls become available in that time call requestStartWorkers before calling this function More...
 
bool serverRunning (int msec=30000)
 returns true if the cloud service shows the server is running blocking call, clears errors and warnings More...
 
bool workersRunning (int msec=30000)
 returns true if the cloud service shows the workers are running blocking call, clears errors and warnings More...
 
bool waitForTerminated (int msec=300000)
 waits up to msec milliseconds and returns true if server and workers are fully terminated in that time call requestTerminate before calling this function More...
 
bool terminateCompleted (int msec=30000)
 returns true if the cloud service shows the server and workers are terminated blocking call, clears errors and warnings More...
 
bool requestInternetAvailable ()
 starts a request to check for internet connectivity clears errors and warnings More...
 
bool requestServiceAvailable ()
 starts a request to check if the cloud service can be reached clears errors and warnings More...
 
bool requestValidateCredentials ()
 starts a request to check if the cloud service validates user credentials clears errors and warnings More...
 
bool requestResourcesAvailableToStart ()
 starts a request to check if the cloud service has sufficient resources to start the requested instances clears errors and warnings More...
 
bool requestStartServer ()
 returns true if the cloud server successfully begins to start the server node returns false if terminated, clears errors and warnings More...
 
bool requestStartWorkers ()
 returns true if the cloud server successfully begins to start all worker nodes returns false if terminated, clears errors and warnings More...
 
bool requestServerRunning ()
 returns true if the cloud server successfully requests the running state of the server More...
 
bool requestWorkersRunning ()
 returns true if the cloud server successfully requests the running state of the workers More...
 
bool requestTerminate ()
 returns true if the cloud server successfully begins to stop all nodes returns false if not running, clears errors and warnings More...
 
bool requestTerminateCompleted ()
 returns true if the cloud server successfully requests the terminated state of the server and workers More...
 
template<typename T >
cast () const
 cast to type T, can throw std::bad_cast More...
 
template<typename T >
boost::optional< T > optionalCast () const
 cast to optional of type T More...
 

Protected Types

typedef
detail::VagrantProvider_Impl 
ImplType
 
- Protected Types inherited from openstudio::CloudProvider
typedef detail::CloudProvider_Impl ImplType
 

Protected Member Functions

 VagrantProvider (const std::shared_ptr< detail::VagrantProvider_Impl > &impl)
 
- Protected Member Functions inherited from openstudio::CloudProvider
 CloudProvider (const std::shared_ptr< detail::CloudProvider_Impl > &impl)
 

Detailed Description

VagrantProvider is a CloudProvider that provides access to local Vagrant virtual machines for testing.

Member Typedef Documentation

typedef detail::VagrantProvider_Impl openstudio::VagrantProvider::ImplType
protected

Constructor & Destructor Documentation

openstudio::VagrantProvider::VagrantProvider ( )

default constructor, loads settings

virtual openstudio::VagrantProvider::~VagrantProvider ( )
virtual

virtual destructor

openstudio::VagrantProvider::VagrantProvider ( const std::shared_ptr< detail::VagrantProvider_Impl > &  impl)
protected