Skip to content

Commit

Permalink
MB-48438 [BP] Add bucketType to terse bucket info
Browse files Browse the repository at this point in the history
Backporting change for MB-46625 to add the bucketType to the results of
the terse bucket info.

$ curl -s -u Administrator:asdasd localhost:9000/pools/default/b/memcBucket \
         | jq | grep bucketType
  "bucketType": "memcached",
$ curl -s -u Administrator:asdasd localhost:9000/pools/default/b/travel-sample \
         | jq | grep bucketType
  "bucketType": "membase",
$ curl -s -u Administrator:asdasd localhost:9000/pools/default/b/ephBucket \
         | jq | grep bucketType
  "bucketType": "ephemeral",

Change-Id: I2ad19b9c3f056315b21c79463ce6f00a3b9d014e
Reviewed-on: http://review.couchbase.org/c/ns_server/+/161435
Well-Formed: Restriction Checker
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Steve Watanabe <steve.watanabe@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Finlay <dave.finlay@couchbase.com>
  • Loading branch information
stevewatanabe authored and dave-finlay committed Sep 13, 2021
1 parent f09935e commit d3beffc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/bucket_info_cache.erl
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ node_bucket_info(Node, Config, Snapshot, Bucket, BucketUUID, BucketConfig) ->
build_short_bucket_info(Id, BucketConfig, Snapshot) ->
BucketUUID = ns_bucket:uuid(Id, Snapshot),
[build_name_and_locator(Id, BucketConfig),
{bucketType, ns_bucket:external_bucket_type(BucketConfig)},
{uuid, BucketUUID},
{uri, build_pools_uri(["buckets", Id], BucketUUID)},
{streamingUri, build_pools_uri(["bucketsStreaming", Id], BucketUUID)},
Expand Down
1 change: 0 additions & 1 deletion src/menelaus_web_buckets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ build_bucket_info(Id, Ctx, InfoLevel, MayExposeAuth, SkipMap) ->
[bucket_info_cache:build_vbucket_map(
menelaus_web_node:get_local_addr(Ctx), BucketConfig)
|| not SkipMap],
{bucketType, ns_bucket:external_bucket_type(BucketConfig)},
{authType, misc:expect_prop_value(auth_type, BucketConfig)},
{localRandomKeyUri,
bucket_info_cache:build_pools_uri(["buckets", Id, "localRandomKey"])},
Expand Down

0 comments on commit d3beffc

Please sign in to comment.