Skip to content

Commit

Permalink
Use different API versions for different services
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinming-Hu authored and vinjiang committed Jan 3, 2020
1 parent 868c703 commit 033ca6b
Show file tree
Hide file tree
Showing 28 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion adls/src/append_data_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace azure { namespace storage_adls {
add_content_length(http, headers, m_length);
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

account.credential()->sign_request(*this, http, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion adls/src/create_directory_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace azure { namespace storage_adls {
add_content_length(http, headers, 0);
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

account.credential()->sign_request(*this, http, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion adls/src/create_file_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace azure { namespace storage_adls {
add_content_length(http, headers, 0);
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

account.credential()->sign_request(*this, http, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion adls/src/delete_directory_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace azure { namespace storage_adls {
storage_headers headers;
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

account.credential()->sign_request(*this, http, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion adls/src/flush_data_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace azure { namespace storage_adls {
add_content_length(http, headers, 0);
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

account.credential()->sign_request(*this, http, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion adls/src/get_access_control_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace azure { namespace storage_adls {
storage_headers headers;
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

account.credential()->sign_request(*this, http, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion adls/src/list_paths_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace azure { namespace storage_adls {
storage_headers headers;
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

account.credential()->sign_request(*this, http, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion adls/src/rename_file_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace azure { namespace storage_adls {
add_content_length(http, headers, 0);
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);
add_ms_header(http, headers, constants::header_ms_rename_source, encode_url_path("/" + m_source_filesystem + "/" + m_source_path));

account.credential()->sign_request(*this, http, url, headers);
Expand Down
2 changes: 1 addition & 1 deletion adls/src/set_access_control_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace azure { namespace storage_adls {
add_content_length(http, headers, 0);
http.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(http, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(http, headers, constants::header_ms_version, constants::header_value_storage_blob_version);
add_ms_header(http, headers, constants::header_ms_owner, m_acl.owner, true);
add_ms_header(http, headers, constants::header_ms_group, m_acl.group, true);
add_ms_header(http, headers, constants::header_ms_permissions, m_acl.permissions, true);
Expand Down
2 changes: 1 addition & 1 deletion include/constants.dat
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ DAT(header_value_page_write_update, "update")
DAT(header_value_page_write_clear, "clear")
DAT(header_value_payload_format_nometadata, "application/json;odata=nometadata")
DAT(header_value_payload_format_fullmetadata, "application/json;odata=fullmetadata")
DAT(header_value_storage_version, "2018-11-09")
DAT(header_value_storage_blob_version, "2018-11-09")

DAT(header_value_user_agent, "azure-storage-cpplite/0.2.0")

Expand Down
2 changes: 1 addition & 1 deletion src/append_block_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/copy_blob_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

// set copy src
add_ms_header(h, headers, constants::header_ms_copy_source, a.credential()->transform_url(source_url.get_domain() + source_url.get_path()));
Expand Down
2 changes: 1 addition & 1 deletion src/create_container_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/delete_blob_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/delete_container_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/get_blob_property_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/get_blob_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/get_block_list_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/get_container_property_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/get_page_ranges_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
4 changes: 2 additions & 2 deletions src/list_blobs_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void list_blobs_request_base::build_request(const storage_account &a, http_base

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down Expand Up @@ -108,7 +108,7 @@ void list_blobs_segmented_request_base::build_request(const storage_account &a,

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/list_containers_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/put_blob_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void put_blob_request_base::build_request(const storage_account &a, http_base &h

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/put_block_list_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void put_block_list_request_base::build_request(const storage_account &a, http_b

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/put_block_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/put_page_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

a.credential()->sign_request(r, h, url, headers);
}
Expand Down
2 changes: 1 addition & 1 deletion src/set_blob_metadata_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

for (const auto& m : metadata())
{
Expand Down
2 changes: 1 addition & 1 deletion src/set_container_metadata_request_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace azure { namespace storage_lite {

h.add_header(constants::header_user_agent, constants::header_value_user_agent);
add_ms_header(h, headers, constants::header_ms_date, get_ms_date(date_format::rfc_1123));
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_version);
add_ms_header(h, headers, constants::header_ms_version, constants::header_value_storage_blob_version);

for (const auto& m : metadata())
{
Expand Down

0 comments on commit 033ca6b

Please sign in to comment.