class Kontena::Plugin::Cloud::Platform::RemoveCommand
Public Instance Methods
execute()
click to toggle source
# File lib/kontena/plugin/cloud/platform/remove_command.rb, line 12 def execute require_platform(name) platform = find_platform_by_name(current_platform, current_organization) confirm_command(name) unless forced? spinner "Removing platform #{pastel.cyan(name)}" do cloud_client.delete("/organizations/#{current_organization}/platforms/#{platform.id}") remove_from_config(name) end end
remove_from_config(name)
click to toggle source
# File lib/kontena/plugin/cloud/platform/remove_command.rb, line 24 def remove_from_config(name) config.current_server = nil config.servers.delete_if {|s| s.name == name } config.write end