From ad9e86dca52a8405f240d231e4ac4c87a2880cb2 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 15 Nov 2012 16:14:30 +0100 Subject: [PATCH] feature #1642: add support for --context in vm creation --- src/cli/one_helper.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cli/one_helper.rb b/src/cli/one_helper.rb index f3a80f5239..e298a816b3 100644 --- a/src/cli/one_helper.rb +++ b/src/cli/one_helper.rb @@ -158,6 +158,12 @@ EOT :large => '--net_context', :description => 'Add network contextualization parameters' }, + { + :name => 'context', + :large => '--context line1,line2,line3', + :format => Array, + :description => 'Lines to add to the context section' + }, { :name => 'dry', :large => '--dry', @@ -599,7 +605,7 @@ EOT end def self.create_context(options) - if !(options.keys & [:ssh, :net_context]).empty? + if !(options.keys & [:ssh, :net_context, :context]).empty? lines=[] if options[:ssh] @@ -635,6 +641,8 @@ EOT end end + lines+=options[:context] + if !lines.empty? "CONTEXT=[\n"<