Apache Mesos
Classes | Functions
mesos::internal::tests::common Namespace Reference

Classes

struct  DefaultCredential
 
struct  DefaultCredential2
 
struct  DefaultFrameworkInfo
 

Functions

template<typename TCommandInfo >
TCommandInfo createCommandInfo (const Option< std::string > &value=None(), const std::vector< std::string > &arguments={})
 
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo createExecutorInfo (const TExecutorID &executorId, const Option< TCommandInfo > &command, const Option< TResources > &resources, const Option< typename TExecutorInfo::Type > &type, const Option< TFrameworkID > &frameworkId)
 
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo createExecutorInfo (const std::string &_executorId, const Option< TCommandInfo > &command, const Option< TResources > &resources, const Option< typename TExecutorInfo::Type > &type, const Option< TFrameworkID > &frameworkId)
 
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo createExecutorInfo (const std::string &executorId, const Option< TCommandInfo > &command=None(), const Option< std::string > &resources=None(), const Option< typename TExecutorInfo::Type > &type=None(), const Option< TFrameworkID > &frameworkId=None())
 
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo createExecutorInfo (const TExecutorID &executorId, const Option< TCommandInfo > &command, const std::string &resources, const Option< typename TExecutorInfo::Type > &type=None(), const Option< TFrameworkID > &frameworkId=None())
 
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo createExecutorInfo (const std::string &executorId, const std::string &command, const Option< std::string > &resources=None(), const Option< typename TExecutorInfo::Type > &type=None(), const Option< TFrameworkID > &frameworkId=None())
 
template<typename TImage >
TImage createDockerImage (const std::string &imageName)
 
template<typename TVolume >
TVolume createVolumeSandboxPath (const std::string &containerPath, const std::string &sandboxPath, const typename TVolume::Mode &mode)
 
template<typename TVolume , typename TMountPropagation >
TVolume createVolumeHostPath (const std::string &containerPath, const std::string &hostPath, const typename TVolume::Mode &mode, const Option< typename TMountPropagation::Mode > &mountPropagationMode=None())
 
template<typename TVolume , typename TImage >
TVolume createVolumeFromDockerImage (const std::string &containerPath, const std::string &imageName, const typename TVolume::Mode &mode)
 
template<typename TNetworkInfo >
TNetworkInfo createNetworkInfo (const std::string &networkName)
 
template<typename TContainerInfo , typename TVolume , typename TImage >
TContainerInfo createContainerInfo (const Option< std::string > &imageName=None(), const std::vector< TVolume > &volumes={})
 
void setAgentID (TaskInfo *task, const SlaveID &slaveId)
 
void setAgentID (mesos::v1::TaskInfo *task, const mesos::v1::AgentID &agentId)
 
template<typename TTaskInfo , typename TExecutorID , typename TSlaveID , typename TResources , typename TExecutorInfo , typename TCommandInfo , typename TOffer >
TTaskInfo createTask (const TSlaveID &slaveId, const TResources &resources, const TCommandInfo &command, const Option< TExecutorID > &executorId=None(), const std::string &name="test-task", const std::string &id=id::UUID::random().toString())
 
template<typename TTaskInfo , typename TExecutorID , typename TSlaveID , typename TResources , typename TExecutorInfo , typename TCommandInfo , typename TOffer >
TTaskInfo createTask (const TSlaveID &slaveId, const TResources &resources, const std::string &command, const Option< TExecutorID > &executorId=None(), const std::string &name="test-task", const std::string &id=id::UUID::random().toString())
 
template<typename TTaskInfo , typename TExecutorID , typename TSlaveID , typename TResources , typename TExecutorInfo , typename TCommandInfo , typename TOffer >
TTaskInfo createTask (const TOffer &offer, const std::string &command, const Option< TExecutorID > &executorId=None(), const std::string &name="test-task", const std::string &id=id::UUID::random().toString())
 
template<typename TTaskGroupInfo , typename TTaskInfo >
TTaskGroupInfo createTaskGroupInfo (const std::vector< TTaskInfo > &tasks)
 
template<typename TResource >
TResource::ReservationInfo createStaticReservationInfo (const std::string &role)
 
template<typename TResource , typename TLabels >
TResource::ReservationInfo createDynamicReservationInfo (const std::string &role, const Option< std::string > &principal=None(), const Option< TLabels > &labels=None())
 
template<typename TResource , typename TResources , typename... TReservationInfos>
TResource createReservedResource (const std::string &name, const std::string &value, const TReservationInfos &...reservations)
 
template<typename TResource , typename TVolume >
TResource::DiskInfo createDiskInfo (const Option< std::string > &persistenceId, const Option< std::string > &containerPath, const Option< typename TVolume::Mode > &mode=None(), const Option< std::string > &hostPath=None(), const Option< typename TResource::DiskInfo::Source > &source=None(), const Option< std::string > &principal=None())
 
template<typename TResource >
TResource::DiskInfo::Source createDiskSourcePath (const Option< std::string > &root=None(), const Option< std::string > &id=None(), const Option< std::string > &profile=None())
 
template<typename TResource >
TResource::DiskInfo::Source createDiskSourceMount (const Option< std::string > &root=None(), const Option< std::string > &id=None(), const Option< std::string > &profile=None())
 
template<typename TResource >
TResource::DiskInfo::Source createDiskSourceBlock (const Option< std::string > &id=None(), const Option< std::string > &profile=None())
 
template<typename TResource >
TResource::DiskInfo::Source createDiskSourceRaw (const Option< std::string > &id=None(), const Option< std::string > &profile=None())
 
template<typename TResource , typename TResources , typename TVolume >
TResource createDiskResource (const std::string &value, const std::string &role, const Option< std::string > &persistenceID, const Option< std::string > &containerPath, const Option< typename TResource::DiskInfo::Source > &source=None(), bool isShared=false)
 
template<typename TResource , typename TResources , typename TVolume >
TResource createPersistentVolume (const Bytes &size, const std::string &role, const std::string &persistenceId, const std::string &containerPath, const Option< std::string > &reservationPrincipal=None(), const Option< typename TResource::DiskInfo::Source > &source=None(), const Option< std::string > &creatorPrincipal=None(), bool isShared=false)
 
template<typename TResource , typename TResources , typename TVolume >
TResource createPersistentVolume (TResource volume, const std::string &persistenceId, const std::string &containerPath, const Option< std::string > &reservationPrincipal=None(), const Option< std::string > &creatorPrincipal=None(), bool isShared=false)
 
template<typename TCredential >
process::http::Headers createBasicAuthHeaders (const TCredential &credential)
 
template<typename TWeightInfo >
google::protobuf::RepeatedPtrField< TWeightInfo > createWeightInfos (const std::string &weightsFlag)
 
template<typename TWeightInfo >
hashmap< std::string, double > convertToHashmap (const google::protobuf::RepeatedPtrField< TWeightInfo > weightInfos)
 
template<typename TDomainInfo >
TDomainInfo createDomainInfo (const std::string &regionName, const std::string &zoneName)
 
template<typename TResources , typename TOffer >
TOffer::Operation RESERVE (const TResources &resources, const Option< std::string > operationId=None())
 
template<typename TResources , typename TOffer >
TOffer::Operation UNRESERVE (const TResources &resources)
 
template<typename TResources , typename TOffer >
TOffer::Operation CREATE (const TResources &volumes)
 
template<typename TResources , typename TOffer >
TOffer::Operation DESTROY (const TResources &volumes)
 
template<typename TResource , typename TOffer >
TOffer::Operation GROW_VOLUME (const TResource &volume, const TResource &addition)
 
template<typename TResource , typename TOffer , typename TValueScalar >
TOffer::Operation SHRINK_VOLUME (const TResource &volume, const TValueScalar &subtract)
 
template<typename TOffer , typename TTaskInfo >
TOffer::Operation LAUNCH (const std::vector< TTaskInfo > &tasks)
 
template<typename TExecutorInfo , typename TTaskGroupInfo , typename TOffer >
TOffer::Operation LAUNCH_GROUP (const TExecutorInfo &executorInfo, const TTaskGroupInfo &taskGroup)
 
template<typename TResource , typename TTargetType , typename TOffer >
TOffer::Operation CREATE_VOLUME (const TResource &source, const TTargetType &type, const Option< std::string > operationId=None())
 
template<typename TResource , typename TOffer >
TOffer::Operation DESTROY_VOLUME (const TResource &volume)
 
template<typename TResource , typename TOffer >
TOffer::Operation CREATE_BLOCK (const TResource &source)
 
template<typename TResource , typename TOffer >
TOffer::Operation DESTROY_BLOCK (const TResource &block)
 
template<typename TParameters , typename TParameter >
TParameters parameterize (const ACLs &acls)
 

Function Documentation

template<typename TWeightInfo >
hashmap<std::string, double> mesos::internal::tests::common::convertToHashmap ( const google::protobuf::RepeatedPtrField< TWeightInfo >  weightInfos)
inline
template<typename TResources , typename TOffer >
TOffer::Operation mesos::internal::tests::common::CREATE ( const TResources &  volumes)
inline
template<typename TResource , typename TOffer >
TOffer::Operation mesos::internal::tests::common::CREATE_BLOCK ( const TResource &  source)
inline
template<typename TResource , typename TTargetType , typename TOffer >
TOffer::Operation mesos::internal::tests::common::CREATE_VOLUME ( const TResource &  source,
const TTargetType &  type,
const Option< std::string >  operationId = None() 
)
inline
template<typename TCredential >
process::http::Headers mesos::internal::tests::common::createBasicAuthHeaders ( const TCredential &  credential)
inline
template<typename TCommandInfo >
TCommandInfo mesos::internal::tests::common::createCommandInfo ( const Option< std::string > &  value = None(),
const std::vector< std::string > &  arguments = {} 
)
inline
template<typename TContainerInfo , typename TVolume , typename TImage >
TContainerInfo mesos::internal::tests::common::createContainerInfo ( const Option< std::string > &  imageName = None(),
const std::vector< TVolume > &  volumes = {} 
)
inline
template<typename TResource , typename TVolume >
TResource::DiskInfo mesos::internal::tests::common::createDiskInfo ( const Option< std::string > &  persistenceId,
const Option< std::string > &  containerPath,
const Option< typename TVolume::Mode > &  mode = None(),
const Option< std::string > &  hostPath = None(),
const Option< typename TResource::DiskInfo::Source > &  source = None(),
const Option< std::string > &  principal = None() 
)
inline
template<typename TResource , typename TResources , typename TVolume >
TResource mesos::internal::tests::common::createDiskResource ( const std::string &  value,
const std::string &  role,
const Option< std::string > &  persistenceID,
const Option< std::string > &  containerPath,
const Option< typename TResource::DiskInfo::Source > &  source = None(),
bool  isShared = false 
)
inline
template<typename TResource >
TResource::DiskInfo::Source mesos::internal::tests::common::createDiskSourceBlock ( const Option< std::string > &  id = None(),
const Option< std::string > &  profile = None() 
)
inline
template<typename TResource >
TResource::DiskInfo::Source mesos::internal::tests::common::createDiskSourceMount ( const Option< std::string > &  root = None(),
const Option< std::string > &  id = None(),
const Option< std::string > &  profile = None() 
)
inline
template<typename TResource >
TResource::DiskInfo::Source mesos::internal::tests::common::createDiskSourcePath ( const Option< std::string > &  root = None(),
const Option< std::string > &  id = None(),
const Option< std::string > &  profile = None() 
)
inline
template<typename TResource >
TResource::DiskInfo::Source mesos::internal::tests::common::createDiskSourceRaw ( const Option< std::string > &  id = None(),
const Option< std::string > &  profile = None() 
)
inline
template<typename TImage >
TImage mesos::internal::tests::common::createDockerImage ( const std::string &  imageName)
inline
template<typename TDomainInfo >
TDomainInfo mesos::internal::tests::common::createDomainInfo ( const std::string &  regionName,
const std::string &  zoneName 
)
inline
template<typename TResource , typename TLabels >
TResource::ReservationInfo mesos::internal::tests::common::createDynamicReservationInfo ( const std::string &  role,
const Option< std::string > &  principal = None(),
const Option< TLabels > &  labels = None() 
)
inline
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo mesos::internal::tests::common::createExecutorInfo ( const TExecutorID &  executorId,
const Option< TCommandInfo > &  command,
const Option< TResources > &  resources,
const Option< typename TExecutorInfo::Type > &  type,
const Option< TFrameworkID > &  frameworkId 
)
inline
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo mesos::internal::tests::common::createExecutorInfo ( const std::string &  _executorId,
const Option< TCommandInfo > &  command,
const Option< TResources > &  resources,
const Option< typename TExecutorInfo::Type > &  type,
const Option< TFrameworkID > &  frameworkId 
)
inline
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo mesos::internal::tests::common::createExecutorInfo ( const std::string &  executorId,
const Option< TCommandInfo > &  command = None(),
const Option< std::string > &  resources = None(),
const Option< typename TExecutorInfo::Type > &  type = None(),
const Option< TFrameworkID > &  frameworkId = None() 
)
inline
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo mesos::internal::tests::common::createExecutorInfo ( const TExecutorID &  executorId,
const Option< TCommandInfo > &  command,
const std::string &  resources,
const Option< typename TExecutorInfo::Type > &  type = None(),
const Option< TFrameworkID > &  frameworkId = None() 
)
inline
template<typename TExecutorInfo , typename TExecutorID , typename TResources , typename TCommandInfo , typename TFrameworkID >
TExecutorInfo mesos::internal::tests::common::createExecutorInfo ( const std::string &  executorId,
const std::string &  command,
const Option< std::string > &  resources = None(),
const Option< typename TExecutorInfo::Type > &  type = None(),
const Option< TFrameworkID > &  frameworkId = None() 
)
inline
template<typename TNetworkInfo >
TNetworkInfo mesos::internal::tests::common::createNetworkInfo ( const std::string &  networkName)
inline
template<typename TResource , typename TResources , typename TVolume >
TResource mesos::internal::tests::common::createPersistentVolume ( const Bytes size,
const std::string &  role,
const std::string &  persistenceId,
const std::string &  containerPath,
const Option< std::string > &  reservationPrincipal = None(),
const Option< typename TResource::DiskInfo::Source > &  source = None(),
const Option< std::string > &  creatorPrincipal = None(),
bool  isShared = false 
)
inline
template<typename TResource , typename TResources , typename TVolume >
TResource mesos::internal::tests::common::createPersistentVolume ( TResource  volume,
const std::string &  persistenceId,
const std::string &  containerPath,
const Option< std::string > &  reservationPrincipal = None(),
const Option< std::string > &  creatorPrincipal = None(),
bool  isShared = false 
)
inline
template<typename TResource , typename TResources , typename... TReservationInfos>
TResource mesos::internal::tests::common::createReservedResource ( const std::string &  name,
const std::string &  value,
const TReservationInfos &...  reservations 
)
inline
template<typename TResource >
TResource::ReservationInfo mesos::internal::tests::common::createStaticReservationInfo ( const std::string &  role)
inline
template<typename TTaskInfo , typename TExecutorID , typename TSlaveID , typename TResources , typename TExecutorInfo , typename TCommandInfo , typename TOffer >
TTaskInfo mesos::internal::tests::common::createTask ( const TSlaveID &  slaveId,
const TResources &  resources,
const TCommandInfo &  command,
const Option< TExecutorID > &  executorId = None(),
const std::string &  name = "test-task",
const std::string &  id = id::UUID::random().toString() 
)
inline
template<typename TTaskInfo , typename TExecutorID , typename TSlaveID , typename TResources , typename TExecutorInfo , typename TCommandInfo , typename TOffer >
TTaskInfo mesos::internal::tests::common::createTask ( const TSlaveID &  slaveId,
const TResources &  resources,
const std::string &  command,
const Option< TExecutorID > &  executorId = None(),
const std::string &  name = "test-task",
const std::string &  id = id::UUID::random().toString() 
)
inline
template<typename TTaskInfo , typename TExecutorID , typename TSlaveID , typename TResources , typename TExecutorInfo , typename TCommandInfo , typename TOffer >
TTaskInfo mesos::internal::tests::common::createTask ( const TOffer &  offer,
const std::string &  command,
const Option< TExecutorID > &  executorId = None(),
const std::string &  name = "test-task",
const std::string &  id = id::UUID::random().toString() 
)
inline
template<typename TTaskGroupInfo , typename TTaskInfo >
TTaskGroupInfo mesos::internal::tests::common::createTaskGroupInfo ( const std::vector< TTaskInfo > &  tasks)
inline
template<typename TVolume , typename TImage >
TVolume mesos::internal::tests::common::createVolumeFromDockerImage ( const std::string &  containerPath,
const std::string &  imageName,
const typename TVolume::Mode &  mode 
)
inline
template<typename TVolume , typename TMountPropagation >
TVolume mesos::internal::tests::common::createVolumeHostPath ( const std::string &  containerPath,
const std::string &  hostPath,
const typename TVolume::Mode &  mode,
const Option< typename TMountPropagation::Mode > &  mountPropagationMode = None() 
)
inline
template<typename TVolume >
TVolume mesos::internal::tests::common::createVolumeSandboxPath ( const std::string &  containerPath,
const std::string &  sandboxPath,
const typename TVolume::Mode &  mode 
)
inline
template<typename TWeightInfo >
google::protobuf::RepeatedPtrField<TWeightInfo> mesos::internal::tests::common::createWeightInfos ( const std::string &  weightsFlag)
inline
template<typename TResources , typename TOffer >
TOffer::Operation mesos::internal::tests::common::DESTROY ( const TResources &  volumes)
inline
template<typename TResource , typename TOffer >
TOffer::Operation mesos::internal::tests::common::DESTROY_BLOCK ( const TResource &  block)
inline
template<typename TResource , typename TOffer >
TOffer::Operation mesos::internal::tests::common::DESTROY_VOLUME ( const TResource &  volume)
inline
template<typename TResource , typename TOffer >
TOffer::Operation mesos::internal::tests::common::GROW_VOLUME ( const TResource &  volume,
const TResource &  addition 
)
inline
template<typename TOffer , typename TTaskInfo >
TOffer::Operation mesos::internal::tests::common::LAUNCH ( const std::vector< TTaskInfo > &  tasks)
inline
template<typename TExecutorInfo , typename TTaskGroupInfo , typename TOffer >
TOffer::Operation mesos::internal::tests::common::LAUNCH_GROUP ( const TExecutorInfo &  executorInfo,
const TTaskGroupInfo &  taskGroup 
)
inline
template<typename TParameters , typename TParameter >
TParameters mesos::internal::tests::common::parameterize ( const ACLs &  acls)
inline
template<typename TResources , typename TOffer >
TOffer::Operation mesos::internal::tests::common::RESERVE ( const TResources &  resources,
const Option< std::string >  operationId = None() 
)
inline
void mesos::internal::tests::common::setAgentID ( TaskInfo *  task,
const SlaveID &  slaveId 
)
inline
void mesos::internal::tests::common::setAgentID ( mesos::v1::TaskInfo *  task,
const mesos::v1::AgentID &  agentId 
)
inline
template<typename TResource , typename TOffer , typename TValueScalar >
TOffer::Operation mesos::internal::tests::common::SHRINK_VOLUME ( const TResource &  volume,
const TValueScalar &  subtract 
)
inline
template<typename TResources , typename TOffer >
TOffer::Operation mesos::internal::tests::common::UNRESERVE ( const TResources &  resources)
inline