Skip to content

Commit

Permalink
Merge pull request #25 from fog/fog_logger
Browse files Browse the repository at this point in the history
Using Fog::Logger to raise deprecations
  • Loading branch information
plribeiro3000 committed Jul 18, 2014
2 parents 19798c7 + 3e94c0c commit c021388
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/models/server.rb
Expand Up @@ -130,7 +130,7 @@ def save(params = {})
end

def revert(snapshot_ref)
warn 'This method is DEPRECATED. Use #snapshot_revert instead.'
Fog::Logger.deprecation 'This method is DEPRECATED. Use #snapshot_revert instead.'
snapshot_revert(snapshot_ref)
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/fog/compute/xen_server/models/servers.rb
Expand Up @@ -8,17 +8,17 @@ class Servers < Fog::Collection
model Fog::Compute::XenServer::Models::Server

def templates
warn 'This method is DEPRECATED. Call #templates directly on the connection instead.'
Fog::Logger.deprecation 'This method is DEPRECATED. Call #templates directly on the connection instead.'
service.templates
end

def custom_templates
warn 'This method is DEPRECATED. Call #custom_templates directly on the connection instead.'
Fog::Logger.deprecation 'This method is DEPRECATED. Call #custom_templates directly on the connection instead.'
service.custom_templates
end

def builtin_templates
warn 'This method is DEPRECATED. Call #builtin_templates directly on the connection instead.'
Fog::Logger.deprecation 'This method is DEPRECATED. Call #builtin_templates directly on the connection instead.'
service.builtin_templates
end

Expand Down
2 changes: 1 addition & 1 deletion lib/fog/compute/xen_server/requests/snapshot_revert.rb
Expand Up @@ -9,7 +9,7 @@ def snapshot_revert_server(snapshot_ref, extra_args = {})
alias_method :snapshot_revert_vm, :snapshot_revert_server

def snapshot_server(snapshot_ref, extra_args = {})
warn 'This method is DEPRECATED. Use #snapshot_revert_server instead.'
Fog::Logger.deprecation 'This method is DEPRECATED. Use #snapshot_revert_server instead.'
snapshot_revert_server(snapshot_ref, extra_args = {})
end
end
Expand Down

0 comments on commit c021388

Please sign in to comment.