From 1c61658e19cfda0fa807ff0e7b557f69f2c94a86 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Fri, 26 Apr 2013 13:34:49 +0200 Subject: [PATCH] feature #1265: Remove publish/unpublish from User CLI. Preserve it at the API level as a "syntactic sugar". --- src/cli/oneimage | 22 ---------------------- src/cli/onetemplate | 23 ----------------------- src/cli/onevnet | 25 +------------------------ 3 files changed, 1 insertion(+), 69 deletions(-) diff --git a/src/cli/oneimage b/src/cli/oneimage index e70c44fa90..59a19b56c8 100755 --- a/src/cli/oneimage +++ b/src/cli/oneimage @@ -184,28 +184,6 @@ cmd=CommandParser::CmdParser.new(ARGV) do end end - publish_desc = <<-EOT.unindent - DEPRECATED, use chmod instead. Publishes the given Image. A public Image - can be seen and used by other users in the Image's group. - EOT - - command :publish, publish_desc, [:range,:imageid_list] do - helper.perform_actions(args[0],options,"published") do |image| - image.publish - end - end - - unpublish_desc = <<-EOT.unindent - DEPRECATED, use chmod instead. Unpublishes the given Image. A private - Image can't be used by any other user. - EOT - - command :unpublish, unpublish_desc, [:range,:imageid_list] do - helper.perform_actions(args[0],options,"unpublished") do |image| - image.unpublish - end - end - persistent_desc = <<-EOT.unindent Makes the given Image persistent. A persistent Image saves the changes made to the contents after the VM instance is shutdown (or in real time diff --git a/src/cli/onetemplate b/src/cli/onetemplate index 7604e4b457..db7153058a 100755 --- a/src/cli/onetemplate +++ b/src/cli/onetemplate @@ -222,29 +222,6 @@ cmd=CommandParser::CmdParser.new(ARGV) do exit_code end - publish_desc = <<-EOT.unindent - DEPRECATED, use chmod instead. Publishes the given Template. A public - Template can be seen and instantiated by other users in the Template's - group. - EOT - - command :publish, publish_desc, [:range,:templateid_list] do - helper.perform_actions(args[0],options,"published") do |t| - t.publish - end - end - - unpublish_desc = <<-EOT.unindent - DEPRECATED, use chmod instead. Unpublishes the given Template. A private - Template can't be instantiated by any other user. - EOT - - command :unpublish, unpublish_desc, [:range,:templateid_list] do - helper.perform_actions(args[0],options,"unpublished") do |t| - t.unpublish - end - end - chgrp_desc = <<-EOT.unindent Changes the Template group EOT diff --git a/src/cli/onevnet b/src/cli/onevnet index 2ada4c1e75..84d64ea7b8 100755 --- a/src/cli/onevnet +++ b/src/cli/onevnet @@ -83,7 +83,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do cid = options[:cluster] || ClusterPool::NONE_CLUSTER_ID helper.create_resource(options) do |vn| - begin + begin template=File.read(args[0]) vn.allocate(template, cid) rescue => e @@ -143,29 +143,6 @@ cmd=CommandParser::CmdParser.new(ARGV) do end end - publish_desc = <<-EOT.unindent - DEPRECATED, use chmod instead. Publishes the given Virtual Network. - A public Virtual Network can be seen and used by other users in the - Virtual Network's group. - EOT - - command :publish, publish_desc, [:range,:vnetid_list] do - helper.perform_actions(args[0],options,"published") do |vn| - vn.publish - end - end - - unpublish_desc = <<-EOT.unindent - DEPRECATED, use chmod instead. Unpublishes the given Virtual Network. A - private Virtual Network can't be used by any other user. - EOT - - command :unpublish, unpublish_desc, [:range,:vnetid_list] do - helper.perform_actions(args[0],options,"unpublished") do |vn| - vn.unpublish - end - end - chgrp_desc = <<-EOT.unindent Changes the Virtual Network group EOT