diff --git a/storage/src/create_bucket_turbo_replication.php b/storage/src/create_bucket_turbo_replication.php index 973a48c7c7..57744cd810 100644 --- a/storage/src/create_bucket_turbo_replication.php +++ b/storage/src/create_bucket_turbo_replication.php @@ -27,7 +27,7 @@ use Google\Cloud\Storage\StorageClient; /** - * Create a Cloud Storage Bucket with Turbo Replication set to `ASYNC_TURBO`. + * Create a Cloud Storage bucket with the recovery point objective (RPO) set to `ASYNC_TURBO`. * The bucket must be a dual-region bucket for this setting to take effect. * * @param string $bucketName The name of your Cloud Storage bucket. @@ -49,7 +49,7 @@ function create_bucket_turbo_replication($bucketName, $location = 'nam4') 'location' => $location, 'rpo' => $rpo ]); - printf('Bucket with Turbo Replication set to \'ASYNC_TURBO\' created: %s' . PHP_EOL, $bucket->name()); + printf('Bucket with recovery point objective (RPO) set to \'ASYNC_TURBO\' created: %s' . PHP_EOL, $bucket->name()); } # [END storage_create_bucket_turbo_replication] diff --git a/storage/src/get_turbo_replication_status.php b/storage/src/get_rpo.php similarity index 93% rename from storage/src/get_turbo_replication_status.php rename to storage/src/get_rpo.php index 269cb676af..7fc5f7164f 100644 --- a/storage/src/get_turbo_replication_status.php +++ b/storage/src/get_rpo.php @@ -27,11 +27,11 @@ use Google\Cloud\Storage\StorageClient; /** - * Get the bucket's Turbo Replication(rpo) setting. + * Get the bucket's recovery point objective (RPO) setting. * * @param string $bucketName the name of your Cloud Storage bucket. */ -function get_turbo_replication_status($bucketName) +function get_rpo($bucketName) { // $bucketName = 'my-bucket'; diff --git a/storage/src/set_turbo_replication_async_turbo.php b/storage/src/set_rpo_async_turbo.php similarity index 90% rename from storage/src/set_turbo_replication_async_turbo.php rename to storage/src/set_rpo_async_turbo.php index 49e110c77c..713f96224a 100644 --- a/storage/src/set_turbo_replication_async_turbo.php +++ b/storage/src/set_rpo_async_turbo.php @@ -32,7 +32,7 @@ * * @param string $bucketName the name of your Cloud Storage bucket. */ -function set_turbo_replication_async_turbo($bucketName) +function set_rpo_async_turbo($bucketName) { // $bucketName = 'my-bucket'; @@ -45,7 +45,7 @@ function set_turbo_replication_async_turbo($bucketName) ]); printf( - 'Turbo Replication has been set to ASYNC_TURBO for %s.' . PHP_EOL, + 'The replication behavior or recovery point objective (RPO) has been set to ASYNC_TURBO for %s.' . PHP_EOL, $bucketName ); } diff --git a/storage/src/set_turbo_replication_default.php b/storage/src/set_rpo_default.php similarity index 86% rename from storage/src/set_turbo_replication_default.php rename to storage/src/set_rpo_default.php index e5f5cae8fa..f1283b99c7 100644 --- a/storage/src/set_turbo_replication_default.php +++ b/storage/src/set_rpo_default.php @@ -27,11 +27,11 @@ use Google\Cloud\Storage\StorageClient; /** - * Set the bucket's Turbo Replication(rpo) setting to `DEFAULT`. + * Set the bucket's replication behavior or recovery point objective (RPO) to `DEFAULT`. * * @param string $bucketName the name of your Cloud Storage bucket. */ -function set_turbo_replication_default($bucketName) +function set_rpo_default($bucketName) { // $bucketName = 'my-bucket'; @@ -46,7 +46,7 @@ function set_turbo_replication_default($bucketName) ]); printf( - 'Turbo Replication has been set to DEFAULT for %s.' . PHP_EOL, + 'The replication behavior or recovery point objective (RPO) has been set to DEFAULT for %s.' . PHP_EOL, $bucketName ); } diff --git a/storage/test/TurboReplicationTest.php b/storage/test/TurboReplicationTest.php index 538d796de1..0b29e749bf 100644 --- a/storage/test/TurboReplicationTest.php +++ b/storage/test/TurboReplicationTest.php @@ -22,7 +22,9 @@ use PHPUnit\Framework\TestCase; /** - * Unit tests for Turbo Replication(RPO) + * Unit tests to manage a bucket's recovery point objective (RPO). An RPO value set to `DEFAULT` + * indicates the default replication behavior is applied to the bucket. + * An RPO value set to `ASYNC_TURBO` indicates turbo replication is applied to the bucket. */ class TurboReplicationTest extends TestCase { @@ -52,7 +54,7 @@ public function testCreateBucketWithTurboReplication() $this->assertStringContainsString( sprintf( - 'Bucket with Turbo Replication set to \'ASYNC_TURBO\' created: %s', + 'Bucket with recovery point objective (RPO) set to \'ASYNC_TURBO\' created: %s', self::$bucketName ), $output @@ -63,9 +65,9 @@ public function testCreateBucketWithTurboReplication() } /** @depends testCreateBucketWithTurboReplication */ - public function testGetTurboReplicationStatus() + public function testGetRpo() { - $output = self::runFunctionSnippet('get_turbo_replication_status', [ + $output = self::runFunctionSnippet('get_rpo', [ self::$bucketName, ]); @@ -79,15 +81,15 @@ public function testGetTurboReplicationStatus() } /** @depends testCreateBucketWithTurboReplication */ - public function testSetTurboReplicationStatusDefault() + public function testSetRpoDefault() { - $output = self::runFunctionSnippet('set_turbo_replication_default', [ + $output = self::runFunctionSnippet('set_rpo_default', [ self::$bucketName, ]); $this->assertEquals( sprintf( - 'Turbo Replication has been set to DEFAULT for %s.' . PHP_EOL, + 'The replication behavior or recovery point objective (RPO) has been set to DEFAULT for %s.' . PHP_EOL, self::$bucketName ), $output @@ -98,15 +100,15 @@ public function testSetTurboReplicationStatusDefault() } /** @depends testCreateBucketWithTurboReplication */ - public function testSetTurboReplicationStatusAsyncTurbo() + public function testSetRpoAsyncTurbo() { - $output = self::runFunctionSnippet('set_turbo_replication_async_turbo', [ + $output = self::runFunctionSnippet('set_rpo_async_turbo', [ self::$bucketName, ]); $this->assertEquals( sprintf( - 'Turbo Replication has been set to ASYNC_TURBO for %s.' . PHP_EOL, + 'The replication behavior or recovery point objective (RPO) has been set to ASYNC_TURBO for %s.' . PHP_EOL, self::$bucketName ), $output