diff options
Diffstat (limited to 'plugins/TestRunner/Aws/Tags.php')
-rw-r--r-- | plugins/TestRunner/Aws/Tags.php | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/plugins/TestRunner/Aws/Tags.php b/plugins/TestRunner/Aws/Tags.php deleted file mode 100644 index cbf81d3d8c..0000000000 --- a/plugins/TestRunner/Aws/Tags.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * - */ - -namespace Piwik\Plugins\TestRunner\Aws; -use Aws\Ec2\Ec2Client; - -class Tags -{ - /** - * @var Ec2Client - */ - private $ec2Client; - - public function __construct(Ec2Client $client) - { - $this->ec2Client = $client; - } - - public function assignTagsToInstances($instanceIds, $testSuite) - { - $tags = array($this->buildTag('Name', 'PiwikTesting')); - - if (!empty($testSuite)) { - $tags[] = $this->buildTag('TestSuite', $testSuite); - } - - $this->ec2Client->createTags(array('Resources' => $instanceIds, 'Tags' => $tags)); - } - - private function buildTag($name, $value) - { - return array( - 'Key' => $name, - 'Value' => $value, - ); - } -}
\ No newline at end of file |