From: Martyn Taylor <mtaylor(a)redhat.com>
---
lib/aeolus_cli/command/delete_command.rb | 60 ++++++++++++++++++-
spec/command/delete_command_spec.rb | 18 +++---
.../command/delete_command/delete_build.yml | 40 ++++++++-----
.../command/delete_command/delete_image.yml | 51 ++++++++++-------
.../delete_command/delete_provider_image.yml | 45 +++++++++------
.../command/delete_command/delete_target_image.yml | 50 ++++++++++-------
6 files changed, 179 insertions(+), 85 deletions(-)
diff --git a/lib/aeolus_cli/command/delete_command.rb
b/lib/aeolus_cli/command/delete_command.rb
index e703918..8f7b3cd 100644
--- a/lib/aeolus_cli/command/delete_command.rb
+++ b/lib/aeolus_cli/command/delete_command.rb
@@ -22,8 +22,10 @@ module Aeolus
def provider_image
begin
if pi = ProviderImage.find(@options[:providerimage])
- if pi.destroy
+ if response = pi.destroy
puts "Provider Image: " + @options[:providerimage] + "
Deleted Successfully"
+ puts ""
+ print_provider_content(response.body)
exit(0)
end
puts "ERROR: Unable to Delete Provider Image: " +
@options[:providerimage]
@@ -40,8 +42,10 @@ module Aeolus
def target_image
begin
if ti = TargetImage.find(@options[:targetimage])
- if ti.destroy
+ if response = ti.destroy
puts "Target Image: " + @options[:targetimage] + " Deleted
Successfully"
+ puts ""
+ print_provider_content(response.body)
exit(0)
end
puts "ERROR: Unable to Delete Target Image: " +
@options[:targetimage]
@@ -58,8 +62,10 @@ module Aeolus
def build
begin
if b = Build.find(@options[:build])
- if b.destroy
+ if response = b.destroy
puts "Build: " + @options[:build] + " Deleted
Successfully"
+ puts ""
+ print_provider_content(response.body)
exit(0)
end
puts "ERROR: Unable to Delete Build: " + @options[:build]
@@ -76,8 +82,10 @@ module Aeolus
def image
begin
if i = Image.find(@options[:image])
- if i.destroy
+ if response = i.destroy
puts "Image: " + @options[:image] + " Deleted
Successfully"
+ puts ""
+ print_provider_content(response.body)
exit(0)
end
puts "ERROR: Unable to Delete Image: " + @options[:image]
@@ -88,6 +96,50 @@ module Aeolus
exit(1)
end
end
+
+ private
+ def print_provider_content(content_xml)
+ h = Hash.from_xml(content_xml)
+ provider_content =
h[h.keys.first]["content"]["provider_content"]
+ content = provider_content.instance_of?(Array) ? provider_content :
[provider_content]
+ if content.size > 0
+ widths = calculate_widths(content)
+ puts "N.B. The following provider content must be manually removed"
+ puts ""
+
+ # Print Headers
+ printf("%-#{widths[:provider] + 5}s", "Provider")
+ printf("%-#{widths[:id] + 5}s", "ID")
+ puts ""
+
+ # Print Column Lines
+ printf("%-#{widths[:provider] + 5}s", "-" *
widths[:provider])
+ printf("%-#{widths[:id] + 5}s", "-" * widths[:id])
+ puts ""
+
+ # Print Content
+ content.each do |pc|
+ printf("%-#{widths[:provider] + 5}s", pc["provider"])
+ printf("%-#{widths[:id] + 5}s", pc["target_identifier"])
+ puts ""
+ end
+ end
+ end
+
+ def calculate_widths(content)
+ widths = {:provider => 8, :id => 2}
+
+ content.to_a.each do |pc|
+ if pc["provider"].length > widths[:provider]
+ widths[:provider] = pc["provider"].length
+ end
+ if pc["target_identifier"].length > widths[:id]
+ widths[:id] = pc["target_identifier"].length
+ end
+ end
+ widths
+ end
+
end
end
end
diff --git a/spec/command/delete_command_spec.rb b/spec/command/delete_command_spec.rb
index b4880a9..49051a8 100644
--- a/spec/command/delete_command_spec.rb
+++ b/spec/command/delete_command_spec.rb
@@ -18,7 +18,7 @@ module Aeolus
module CLI
describe DeleteCommand do
it "should delete a provider image of a given id" do
- @options = {:providerimage =>
"8f8bc89c-f86b-4366-8b28-f632ad7ce711"}
+ @options = {:providerimage =>
"20bb51cb-a289-4331-9e56-26196df62ca8"}
VCR.use_cassette('command/delete_command/delete_provider_image') do
dc = DeleteCommand.new(@options)
begin
@@ -26,25 +26,25 @@ module Aeolus
rescue SystemExit => e
e.status.should == 0
end
- $stdout.string.should include("Provider Image:
8f8bc89c-f86b-4366-8b28-f632ad7ce711 Deleted Successfully")
+ $stdout.string.should include("Provider Image:
20bb51cb-a289-4331-9e56-26196df62ca8 Deleted Successfully")
end
end
it "should delete an target image of a given id" do
VCR.use_cassette('command/delete_command/delete_target_image') do
- @options = {:targetimage =>
"e626cadf-5901-4db4-95c5-d53a696e00dd"}
+ @options = {:targetimage =>
"ef7ee9be-5f3c-4695-969a-7c3fa996c048"}
dc = DeleteCommand.new(@options)
begin
dc.target_image
rescue SystemExit => e
e.status.should == 0
end
- $stdout.string.should include("Target Image:
e626cadf-5901-4db4-95c5-d53a696e00dd Deleted Successfully")
+ $stdout.string.should include("Target Image:
ef7ee9be-5f3c-4695-969a-7c3fa996c048 Deleted Successfully")
end
end
it "should delete a build of a given id" do
- @options = {:build => "a5b23c06-8d63-4173-be49-fb15975065da"}
+ @options = {:build => "becc269c-8a02-4f6a-9132-2af3cb580b2b"}
VCR.use_cassette('command/delete_command/delete_build') do
dc = DeleteCommand.new(@options)
begin
@@ -52,20 +52,22 @@ module Aeolus
rescue SystemExit => e
e.status.should == 0
end
- $stdout.string.should include("Build: a5b23c06-8d63-4173-be49-fb15975065da
Deleted Successfully")
+ $stdout.string.should include("Build: becc269c-8a02-4f6a-9132-2af3cb580b2b
Deleted Successfully")
end
end
it "should delete an image of a given id" do
VCR.use_cassette('command/delete_command/delete_image') do
- @options = {:image => "3d0ee4e4-901f-415d-be3a-f8da80e74d03"}
+ @options = {:image => "55bc53d9-7310-4cff-8c26-99823d79dfa6"}
dc = DeleteCommand.new(@options)
begin
dc.image
rescue SystemExit => e
e.status.should == 0
end
- $stdout.string.should include("Image: 3d0ee4e4-901f-415d-be3a-f8da80e74d03
Deleted Successfully")
+ $stdout.string.should include("Image: 55bc53d9-7310-4cff-8c26-99823d79dfa6
Deleted Successfully")
+ $stdout.string.should include("N.B. The following provider content must be
manually removed")
+ $stdout.string.should include("mock")
end
end
end
diff --git a/spec/vcr/cassettes/command/delete_command/delete_build.yml
b/spec/vcr/cassettes/command/delete_command/delete_build.yml
index 91f7f24..c98ef6b 100644
--- a/spec/vcr/cassettes/command/delete_command/delete_build.yml
+++ b/spec/vcr/cassettes/command/delete_command/delete_build.yml
@@ -2,7 +2,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri:
https://admin:password@localhost/conductor/api/builds/a5b23c06-8d63-4173-...
+ uri:
https://admin:password@localhost/conductor/api/builds/becc269c-8a02-4f6a-...
body:
headers:
accept:
@@ -15,31 +15,31 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"9690c7b091734e0fdb3cdd9bd0ef06d3\""
+ - "\"71449ca7c870c6c887369395014f69bc\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 19:52:42 GMT
+ - Tue, 29 Nov 2011 18:26:39 GMT
x-runtime:
- - "0.647424"
+ - "0.653854"
content-length:
- "284"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlOTYyM2IxMzFjOWEzNTNiM2EzN2Y0NmQzNWZkNjYxY2EiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--e792880eac59e96477f2d88698a82c60398cf713;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlOGNlOGZhMzEzMzY5OGMxN2QyOWIyNDgzYmM4NmUyMjEiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--1f68def7af1bf473feb03e1224f9ffa41bf55670;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
body: |
- <build
href='http://localhost:3000/api/builds/a5b23c06-8d63-4173-be49-fb15975065da'
id='a5b23c06-8d63-4173-be49-fb15975065da'>
- <image
href='http://localhost:3000/api/images/3d0ee4e4-901f-415d-be3a-f8da80e74d03'
type='xs:string'>3d0ee4e4-901f-415d-be3a-f8da80e74d03</image>
+ <build
href='http://localhost:3000/api/builds/becc269c-8a02-4f6a-9132-2af3cb580b2b'
id='becc269c-8a02-4f6a-9132-2af3cb580b2b'>
+ <image
href='http://localhost:3000/api/images/d9c97a9d-5c4e-4807-afa0-a5ce89cbc4e5'
type='xs:string'>d9c97a9d-5c4e-4807-afa0-a5ce89cbc4e5</image>
</build>
http_version: "1.1"
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :delete
- uri:
https://admin:password@localhost/conductor/api/builds/a5b23c06-8d63-4173-...
+ uri:
https://admin:password@localhost/conductor/api/builds/becc269c-8a02-4f6a-...
body:
headers:
accept:
@@ -52,20 +52,30 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"a505c6ebbc5d403928e1ef4e4068274c\""
+ - "\"b7e7162a602a70fed382ca7c8bb9d7f2\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 19:52:43 GMT
+ - Tue, 29 Nov 2011 18:26:40 GMT
x-runtime:
- - "0.665006"
+ - "0.715743"
content-length:
- - "13"
+ - "359"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlNjgyYjY4MGQyOTM2YjVmZWFkMzIzNDIzMTA2OWI0NDgiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--f1be1b50c8200f8402d2a07004ce31b25c68876d;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlZTM2MDFkMmQ3Y2UyY2Q1Y2UzMTIyYjQ4ZTI5NTlkZGYiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--5f5efb6f830d1f6065379455e009464efcaef945;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
- body: Build Deleted
- http_version: "1.1"
+ body: |
+ <build
href='http://localhost:3000/api/images/becc269c-8a02-4f6a-9132-2af3cb580b2b'
id='becc269c-8a02-4f6a-9132-2af3cb580b2b'>
+ <status>DELETED</status>
+ <content>
+ <provider_content>
+ <provider>mock</provider>
+
<target_identifier>Mock_mock_bbf54d52-4171-4dc6-96b3-62f08173a792</target_identifier>
+ </provider_content>
+ </content>
+ </build>
+
+ http_version: "1.1"
\ No newline at end of file
diff --git a/spec/vcr/cassettes/command/delete_command/delete_image.yml
b/spec/vcr/cassettes/command/delete_command/delete_image.yml
index 5be8625..c561565 100644
--- a/spec/vcr/cassettes/command/delete_command/delete_image.yml
+++ b/spec/vcr/cassettes/command/delete_command/delete_image.yml
@@ -2,11 +2,11 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri:
https://admin:password@localhost/conductor/api/images/3d0ee4e4-901f-415d-...
+ uri:
https://admin:password@localhost/conductor/api/images/55bc53d9-7310-4cff-...
body:
headers:
accept:
- - application/xml
+ - application/xml
response: !ruby/struct:VCR::Response
status: !ruby/struct:VCR::ResponseStatus
code: 200
@@ -15,29 +15,30 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"cc43f6a95f5152f860ce275abf8053db\""
+ - "\"66a9f07339b90b9ea9c4ebc650419bad\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 19:52:44 GMT
+ - Tue, 29 Nov 2011 18:26:41 GMT
x-runtime:
- - "0.659938"
+ - "0.921110"
content-length:
- - "281"
+ - "437"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlYWYwOTg2NzY1ZTJkMWZlNzMwMzg1MTRmMDAxNDk1YmEiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--3fb9e618235c265be515dcdad78d1eb45b6f228f;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlNzA0ZDY1MWU5ZWRkZmFhMDkyNWUzM2M5NjkzM2JmMjQiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--b21c884f98b9be3b03ced13752c251a14e96ca33;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
body: |
- <image
href='http://localhost:3000/api/images/3d0ee4e4-901f-415d-be3a-f8da80e74d03'
id='3d0ee4e4-901f-415d-be3a-f8da80e74d03'>
+ <image
href='http://localhost:3000/api/images/55bc53d9-7310-4cff-8c26-99823d79dfa6'
id='55bc53d9-7310-4cff-8c26-99823d79dfa6'>
<name>tmpl1</name>
- <description></description>
- <os></os>
- <os_version></os_version>
- <arch></arch>
+ <description>foo</description>
+ <os>Fedora</os>
+ <os_version>14</os_version>
+ <arch>x86_64</arch>
<builds type='xs:list'>
+ <build
href='http://localhost:3000/api/builds/5847f6a3-1959-43fe-aee4-e3389287ab7a'
id='5847f6a3-1959-43fe-aee4-e3389287ab7a'></build>
</builds>
</image>
@@ -45,7 +46,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :delete
- uri:
https://admin:password@localhost/conductor/api/images/3d0ee4e4-901f-415d-...
+ uri:
https://admin:password@localhost/conductor/api/images/55bc53d9-7310-4cff-...
body:
headers:
accept:
@@ -58,20 +59,30 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"5902e96950f4ffc9e380d555f8894f44\""
+ - "\"9fc839a91166d43690c26885a2a38466\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 19:52:44 GMT
+ - Tue, 29 Nov 2011 18:26:42 GMT
x-runtime:
- - "0.519205"
+ - "0.935781"
content-length:
- - "13"
+ - "359"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlZThmZGUwNGJiZDhlY2E5ODJjN2E2YzMzNWU5Mzg3ODQiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--f9ed5f598c4bd2451a26aac38bb71db82e0d2264;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlOWQxY2IxYzk2ZmM4ZDUzMDMwY2E2MWEzMDdiZTRlMzgiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--72d8f2fc779a53cb1950c490caad85412dd2f011;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
- body: Image Deleted
- http_version: "1.1"
+ body: |
+ <image
href='http://localhost:3000/api/images/55bc53d9-7310-4cff-8c26-99823d79dfa6'
id='55bc53d9-7310-4cff-8c26-99823d79dfa6'>
+ <status>DELETED</status>
+ <content>
+ <provider_content>
+ <provider>mock</provider>
+
<target_identifier>Mock_mock_4ad0c064-9b09-490b-9988-d17792705a4c</target_identifier>
+ </provider_content>
+ </content>
+ </image>
+
+ http_version: "1.1"
\ No newline at end of file
diff --git a/spec/vcr/cassettes/command/delete_command/delete_provider_image.yml
b/spec/vcr/cassettes/command/delete_command/delete_provider_image.yml
index dbbfa83..86e0b39 100644
--- a/spec/vcr/cassettes/command/delete_command/delete_provider_image.yml
+++ b/spec/vcr/cassettes/command/delete_command/delete_provider_image.yml
@@ -2,7 +2,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri:
https://admin:password@localhost/conductor/api/provider_images/8f8bc89c-f...
+ uri:
https://admin:password@localhost/conductor/api/provider_images/20bb51cb-a...
body:
headers:
accept:
@@ -15,35 +15,35 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"940d3812694969c5a5e84a1d132f967d\""
+ - "\"180a6f46372966e392803bbf12e4678f\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 20:05:22 GMT
+ - Tue, 29 Nov 2011 18:26:37 GMT
x-runtime:
- - "0.594585"
+ - "0.778803"
content-length:
- - "484"
+ - "509"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlYjM4Mjg2MTJhNDA1ZmYzNDBmOTc5YWFlNzA1Nzk2N2UiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--b3033b6a4e4c00a3f27d087dfe38df1b6c599a52;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlYTJkM2JjZDE0NjU4ZTNjOTc5ZTEwNDcxZGVhNGE0YWYiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--c79970e4b9295344a984e887dae8ddc3c29de7e7;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
body: |
- <provider_image
href='http://localhost:3000/api/provider_images/8f8bc89c-f86b-4366-8b28-f632ad7ce711'
id='8f8bc89c-f86b-4366-8b28-f632ad7ce711'>
+ <provider_image
href='http://localhost:3000/api/provider_images/20bb51cb-a289-4331-9e56-26196df62ca8'
id='20bb51cb-a289-4331-9e56-26196df62ca8'>
<object_type>provider_image</object_type>
- <target_identifier>ami-a3ce01ca</target_identifier>
+
<target_identifier>Mock_mock_20bb51cb-a289-4331-9e56-26196df62ca8</target_identifier>
<status>COMPLETE</status>
- <provider>ec2-us-east-1</provider>
- <target_image
href='http://localhost:3000/api/target_images/2433f569-ff6e-4f8c-8c1b-6667508e4c1b'
id='2433f569-ff6e-4f8c-8c1b-6667508e4c1b'></target_image>
+ <provider>mock</provider>
+ <target_image
href='http://localhost:3000/api/target_images/9222d9e2-1a73-4d9a-a87d-038e534d813d'
id='9222d9e2-1a73-4d9a-a87d-038e534d813d'></target_image>
</provider_image>
http_version: "1.1"
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :delete
- uri:
https://admin:password@localhost/conductor/api/provider_images/8f8bc89c-f...
+ uri:
https://admin:password@localhost/conductor/api/provider_images/20bb51cb-a...
body:
headers:
accept:
@@ -56,20 +56,29 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"f4b3876a1a002fc8a2ebc09c1cbbab14\""
+ - "\"8ef4d1ddfaa567b175476b9b325be726\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 20:05:23 GMT
+ - Tue, 29 Nov 2011 18:26:37 GMT
x-runtime:
- - "0.477794"
+ - "0.472007"
content-length:
- - "22"
+ - "350"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlYjMwZmU1NjU0NDc1ODhlYjEzNTUyOWQxMjBiODMyOGIiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--188f8bf79153f4b7bf62877bb94bdd94f54b6788;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlNzg2NGU5M2ZhY2UxNjcxMWU5NjA2NDk2YWY4MjNiYTkiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--79f7ca4407476ca9efe760e63ed946c0fa633e2d;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
- body: Provider Image Deleted
- http_version: "1.1"
+ body: |
+ <provider_image
href='http://localhost:3000/api/images/20bb51cb-a289-4331-9e56-26196df62ca8'
id='20bb51cb-a289-4331-9e56-26196df62ca8'>
+ <content>
+ <provider_content>
+ <provider>mock</provider>
+
<target_identifier>Mock_mock_20bb51cb-a289-4331-9e56-26196df62ca8</target_identifier>
+ </provider_content>
+ </content>
+ </provider_image>
+
+ http_version: "1.1"
\ No newline at end of file
diff --git a/spec/vcr/cassettes/command/delete_command/delete_target_image.yml
b/spec/vcr/cassettes/command/delete_command/delete_target_image.yml
index e50b7dc..47de1cc 100644
--- a/spec/vcr/cassettes/command/delete_command/delete_target_image.yml
+++ b/spec/vcr/cassettes/command/delete_command/delete_target_image.yml
@@ -2,7 +2,7 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri:
https://admin:password@localhost/conductor/api/target_images/e626cadf-590...
+ uri:
https://admin:password@localhost/conductor/api/target_images/ef7ee9be-5f3...
body:
headers:
accept:
@@ -15,37 +15,37 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"750a6fd6f256f02577362005d205b9a0\""
+ - "\"7e083dd58b10d05991766e5bc6441486\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 19:52:41 GMT
+ - Tue, 29 Nov 2011 18:26:38 GMT
x-runtime:
- - "1.064720"
+ - "0.792434"
content-length:
- - "629"
+ - "631"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlNGYxYWEwNTc4ZDEzZjhmMzA5OTczNDE1MWRjYTE5ZTMiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--6bd775a222316d51f8fbca9c9f64a960b3cfd7d0;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlNWI1YWY0MmQ1NmI5YWIxZGIxY2U1M2MzODI1YWE5MmEiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--8fe5eaf8f3316e679d51832d17c82dd88f45c275;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
body: |
- <target_image
href='http://localhost:3000/api/target_images/e626cadf-5901-4db4-95c5-d53a696e00dd'
id='e626cadf-5901-4db4-95c5-d53a696e00dd'>
+ <target_image
href='http://localhost:3000/api/target_images/ef7ee9be-5f3c-4695-969a-7c3fa996c048'
id='ef7ee9be-5f3c-4695-969a-7c3fa996c048'>
<object_type>target_image</object_type>
- <template>b97b62c8-a55b-4fb6-8ca9-f67e4e869f0b</template>
- <build
href='http://localhost:3000/api/builds/a5b23c06-8d63-4173-be49-fb15975065da'
id='a5b23c06-8d63-4173-be49-fb15975065da'></build>
+ <template>13280eb7-061b-479e-b849-ce081dede44a</template>
+ <build
href='http://localhost:3000/api/builds/b61fc15b-a0a4-4f03-b30f-c105f111ff56'
id='b61fc15b-a0a4-4f03-b30f-c105f111ff56'></build>
<status>COMPLETE</status>
- <provider_image>
- <provider_image
href='http://localhost:3000/api/provider_images/c36c478c-58af-446b-80bf-1720724a68bd'
id='c36c478c-58af-446b-80bf-1720724a68bd'></provider_image>
- </provider_image>
+ <provider_images>
+ <provider_image
href='http://localhost:3000/api/provider_images/4143d80a-6ec9-42fd-b888-1e670409b398'
id='4143d80a-6ec9-42fd-b888-1e670409b398'></provider_image>
+ </provider_images>
</target_image>
http_version: "1.1"
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :delete
- uri:
https://admin:password@localhost/conductor/api/target_images/e626cadf-590...
+ uri:
https://admin:password@localhost/conductor/api/target_images/ef7ee9be-5f3...
body:
headers:
accept:
@@ -58,20 +58,30 @@
x-ua-compatible:
- IE=Edge
etag:
- - "\"c2f80b58455fb6d578895fc59bf244e2\""
+ - "\"dca46545e568a3c8e05269ec456c8e42\""
content-type:
- application/xml; charset=utf-8
server:
- WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)
date:
- - Wed, 19 Oct 2011 19:52:42 GMT
+ - Tue, 29 Nov 2011 18:26:39 GMT
x-runtime:
- - "0.616347"
+ - "0.751077"
content-length:
- - "20"
+ - "373"
set-cookie:
- -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlYTc5NGUyMzY0NTk1MzNmNWMyNjA3OGJmYmJlYTE4YjQiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--2530799f06e70fa34ea5562eb195c1304c530774;
path=/; HttpOnly
+ -
_session_id=BAh7CCIPc2Vzc2lvbl9pZCIlYWMwMTllMmQ5NjkyNmQ0YTYwZGJiMTMxMzQ1NjViODciGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--b47265bc5afba16a6ec0a7a1fd147df892dbe0ba;
path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
- body: Target Image Deleted
- http_version: "1.1"
+ body: |
+ <target_image
href='http://localhost:3000/api/images/ef7ee9be-5f3c-4695-969a-7c3fa996c048'
id='ef7ee9be-5f3c-4695-969a-7c3fa996c048'>
+ <status>DELETED</status>
+ <content>
+ <provider_content>
+ <provider>mock</provider>
+
<target_identifier>Mock_mock_4143d80a-6ec9-42fd-b888-1e670409b398</target_identifier>
+ </provider_content>
+ </content>
+ </target_image>
+
+ http_version: "1.1"
\ No newline at end of file
--
1.7.6.4