Esempio n. 1
0
AWSSession AWSSessionRecord_Impl::awsSession() const {
    OptionalUrl serverUrl;
    std::string serverId;
    if (OptionalUrlRecord sur = serverUrlRecord()) {
        serverUrl = sur->url();
        serverId = sur->name();
    }
    UrlVector workerUrls;
    StringVector workerIds;
    for (const UrlRecord& wur : workerUrlRecords()) {
        workerUrls.push_back(wur.url());
        workerIds.push_back(wur.name());
    }
    return AWSSession(handle(),
                      uuidLast(),
                      sessionId(),
                      serverUrl,
                      serverId,
                      m_numServerProcessors,
                      workerUrls,
                      workerIds,
                      m_numWorkerProcessors,
                      m_privateKey,
                      m_timestamp,
                      m_region,
                      m_serverInstanceType,
                      m_workerInstanceType);
}
 std::vector<ObjectRecord> CloudSessionRecord_Impl::children() const {
   ObjectRecordVector result;
   if (OptionalUrlRecord sur = serverUrlRecord()) {
     result.push_back(*sur);
   }
   UrlRecordVector workers = workerUrlRecords();
   result.insert(result.end(),workers.begin(),workers.end());
   return result;
 }
 VagrantSession VagrantSessionRecord_Impl::vagrantSession() const {
   OptionalUrl serverUrl;
   if (OptionalUrlRecord sur = serverUrlRecord()) {
     serverUrl = sur->url();
   }
   UrlVector workerUrls;
   for (const UrlRecord& wur : workerUrlRecords()) {
     workerUrls.push_back(wur.url());
   }
   return VagrantSession(handle(),
                         uuidLast(),
                         sessionId(),
                         serverUrl,
                         workerUrls);
 }