зеркало из
1
0
Форкнуть 0

Changed naming of disable_sql_rdfe to disable_sql_endpoint.

This commit is contained in:
Ranjan Kumar 2014-01-03 12:37:10 +05:30
Родитель 04a1e4ad2b
Коммит 9f7f3b37bc
8 изменённых файлов: 23 добавлений и 23 удалений

Просмотреть файл

@ -109,7 +109,7 @@ There are two ways you can set up the connections:
config.subscription_id = "<your Subscriptionid>"
config.management_endpoint = "https://management.core.windows.net"
# This property enables/disables SQL API RDFE endpoint. By default RDFE is enabled. RDFE will also be enabled if you do not set this property
config.disable_sql_rdfe = true
config.disable_sql_endpoint = true
# Configure the non-RDFE SQL API endpoint here
config.sql_management_endpoint = "http://management.database.windows.net:8443"
end
@ -151,7 +151,7 @@ There are two ways you can set up the connections:
AZURE_SUBSCRIPTION_ID = <your subscription ID>
AZURE_MANAGEMENT_ENDPOINT = <The endpoint URL of Windows Azure management service>
AZURE_SQL_MANAGEMENT_ENDPOINT = <Non-RDFE SQL Management Endpoint>
AZURE_DISABLE_SQL_RDFE = <true_or_false>
AZURE_DISABLE_SQL_ENDPOINT = <true_or_false>
```
* Against local Emulator (Windows Only)
* Storage

Просмотреть файл

@ -36,5 +36,5 @@ Azure.configure do |config|
config.management_endpoint = ENV["AZURE_MANAGEMENT_ENDPOINT"]
config.sql_management_endpoint = ENV["AZURE_SQL_MANAGEMENT_ENDPOINT"]
config.disable_sql_rdfe = ENV['AZURE_DISABLE_SQL_RDFE'] || 'false'
config.disable_sql_endpoint = ENV['AZURE_DISABLE_SQL_ENDPOINT'] || 'false'
end

Просмотреть файл

@ -195,11 +195,11 @@ module Azure
end
# Public: Set this true to use non-RDFE SQL API Endpoint
attr_accessor :disable_sql_rdfe
attr_accessor :disable_sql_endpoint
def disable_sql_rdfe
return false if @disable_sql_rdfe.nil? or @disable_sql_rdfe.empty?
@disable_sql_rdfe.downcase == 'true'
def disable_sql_endpoint
return false if @disable_sql_endpoint.nil? or @disable_sql_endpoint.empty?
@disable_sql_endpoint.downcase == 'true'
end
end
end

Просмотреть файл

@ -77,7 +77,7 @@ module Azure
def self.database_firewall_from_xml(response_xml)
firewalls = []
if Azure.config.disable_sql_rdfe
if Azure.config.disable_sql_endpoint
database_firewallXML = response_xml.css('FirewallRules FirewallRule')
database_firewallXML.each do |firewall_xml|
firewall = {

Просмотреть файл

@ -32,7 +32,7 @@ module Azure
def list_servers
request_path = "/servers"
if Azure.config.disable_sql_rdfe
if Azure.config.disable_sql_endpoint
request = SqlManagementHttpRequest.new(:get, request_path, nil)
request.headers["x-ms-version"] = @x_ms_version
else
@ -59,7 +59,7 @@ module Azure
body = Serialization.database_to_xml(login, password, location)
request_path = "/servers"
if Azure.config.disable_sql_rdfe
if Azure.config.disable_sql_endpoint
request = SqlManagementHttpRequest.new(:post, request_path, body)
request.headers["x-ms-version"] = @x_ms_version
else
@ -87,7 +87,7 @@ module Azure
if get_sql_server(name)
request_path = "/servers/#{name}"
if Azure.config.disable_sql_rdfe
if Azure.config.disable_sql_endpoint
request = SqlManagementHttpRequest.new(:delete, request_path)
request.headers["x-ms-version"] = @x_ms_version
else
@ -116,7 +116,7 @@ module Azure
request_path = "/servers/#{name}?op=ResetPassword"
body = Serialization.reset_password_to_xml(password)
if Azure.config.disable_sql_rdfe
if Azure.config.disable_sql_endpoint
request = SqlManagementHttpRequest.new(:post, request_path, body)
request.headers["x-ms-version"] = @x_ms_version
else
@ -185,7 +185,7 @@ module Azure
if get_sql_server(server_name)
request_path = "/servers/#{server_name}/firewallrules"
if Azure.config.disable_sql_rdfe
if Azure.config.disable_sql_endpoint
request = SqlManagementHttpRequest.new(:get, request_path)
request.headers["x-ms-version"] = @x_ms_version
else
@ -215,7 +215,7 @@ module Azure
elsif get_sql_server(server_name)
request_path = "/servers/#{server_name}/firewallrules/#{rule_name}"
if Azure.config.disable_sql_rdfe
if Azure.config.disable_sql_endpoint
request = SqlManagementHttpRequest.new(:delete, request_path)
request.headers["x-ms-version"] = @x_ms_version
else

Просмотреть файл

@ -20,12 +20,12 @@ describe Azure::SqlDatabaseManagement::Serialization do
let(:sql_servers_xml) { Fixtures['list_sql_database'] }
before {
@rdfe = Azure.config.disable_sql_rdfe
Azure.config.disable_sql_rdfe = 'true'
@rdfe = Azure.config.disable_sql_endpoint
Azure.config.disable_sql_endpoint = 'true'
}
after {
Azure.config.disable_sql_rdfe = "#{@rdfe}"
Azure.config.disable_sql_endpoint = "#{@rdfe}"
}
describe '#databases_from_xml' do

Просмотреть файл

@ -26,12 +26,12 @@ describe 'Azure::SqlDatabaseManagementService - non-RDFE Endpoint' do
Loggerx.expects(:puts).returns(nil).at_least(0)
mock_request.stubs(:headers).returns(response_headers)
mock_request.expects(:call).returns(Nokogiri::XML response_xml).at_least(0)
@rdfe_off = Azure.config.disable_sql_rdfe
Azure.config.disable_sql_rdfe = 'true'
@rdfe_off = Azure.config.disable_sql_endpoint
Azure.config.disable_sql_endpoint = 'true'
end
after do
Azure.config.disable_sql_rdfe = "#{@rdfe_off}"
Azure.config.disable_sql_endpoint = "#{@rdfe_off}"
end
describe '#list_servers' do

Просмотреть файл

@ -26,12 +26,12 @@ describe 'Azure::SqlDatabaseManagementService - RDFE Endpoint' do
Loggerx.expects(:puts).returns(nil).at_least(0)
mock_request.stubs(:headers).returns(response_headers)
mock_request.expects(:call).returns(Nokogiri::XML response_xml).at_least(0)
@rdfe_off = Azure.config.disable_sql_rdfe
Azure.config.disable_sql_rdfe = nil
@rdfe_off = Azure.config.disable_sql_endpoint
Azure.config.disable_sql_endpoint = nil
end
after do
Azure.config.disable_sql_rdfe = "#{@rdfe_off}"
Azure.config.disable_sql_endpoint = "#{@rdfe_off}"
end
describe '#list_servers' do