From da7e1ede9e73bf0e107b9b37954f204cea544439 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 5 Oct 2015 08:46:07 -0700 Subject: [PATCH] Move create vm states to svg diagram Change-Id: Ib747b55b6773ded8f6bb484bcbf4394ff46d36e0 --- doc/source/image_src/create_vm_states.diag | 28 +++++ doc/source/images/create_vm_states.svg | 114 +++++++++++++++++++++ doc/source/vmstates.rst | 42 +------- 3 files changed, 145 insertions(+), 39 deletions(-) create mode 100644 doc/source/image_src/create_vm_states.diag create mode 100644 doc/source/images/create_vm_states.svg diff --git a/doc/source/image_src/create_vm_states.diag b/doc/source/image_src/create_vm_states.diag new file mode 100644 index 000000000000..60297108bc18 --- /dev/null +++ b/doc/source/image_src/create_vm_states.diag @@ -0,0 +1,28 @@ +seqdiag { + edge_length = 250; + span_height = 40; + node_width=200; + default_note_color = lightblue; + + // Use note (put note on rightside) + api [label="Compute.api"]; + manager [label="Compute.manager"]; + api -> manager [label = "create_db_entry_for_new_instance", + note = "VM: Building + Task: Scheduling + Power: No State"]; + manager -> manager [label="_start_building", + note ="VM: Building + Task: None"]; + manager -> manager [label="_allocate_network", + note ="VM: Building + Task: Networking"]; + manager -> manager [label="_prep_block_device", + note ="VM: Building + Task: Block_Device_Mapping"]; + manager -> manager [label="_spawn", + note ="VM: Building + Task: Spawning"]; + api <-- manager [note ="VM: Active + Task: None"]; +} diff --git a/doc/source/images/create_vm_states.svg b/doc/source/images/create_vm_states.svg new file mode 100644 index 000000000000..87ab72155c1f --- /dev/null +++ b/doc/source/images/create_vm_states.svg @@ -0,0 +1,114 @@ + + + + + + + + + blockdiag + seqdiag { + edge_length = 250; + span_height = 40; + node_width=200; + default_note_color = lightblue; + + // Use note (put note on rightside) + api [label="Compute.api"]; + manager [label="Compute.manager"]; + api -> manager [label = "create_db_entry_for_new_instance", + note = "VM: Building + Task: Scheduling + Power: No State"]; + manager -> manager [label="_start_building", + note ="VM: Building + Task: None"]; + manager -> manager [label="_allocate_network", + note ="VM: Building + Task: Networking"]; + manager -> manager [label="_prep_block_device", + note ="VM: Building + Task: Block_Device_Mapping"]; + manager -> manager [label="_spawn", + note ="VM: Building + Task: Spawning"]; + api <-- manager [note ="VM: Active + Task: None"]; +} + + + + + + + + + + + + + + + + + + Compute.api + + Compute.manager + + + + + + VM: Building + Task: Scheduling + Power: No State + + + + + + + + VM: Building + Task: None + + + + + + + + VM: Building + Task: Networking + + + + + + + + VM: Building + Task: Block_Device_Mapping + + + + + + + + VM: Building + Task: Spawning + + + + + + VM: Active + Task: None + create_db_entry_for_new_instance + _start_building + _allocate_network + _prep_block_device + _spawn + diff --git a/doc/source/vmstates.rst b/doc/source/vmstates.rst index bcb237a3d44c..978fe5223e73 100644 --- a/doc/source/vmstates.rst +++ b/doc/source/vmstates.rst @@ -136,42 +136,6 @@ Create Instance States The following diagram shows the sequence of VM states, task states, and power states when a new VM instance is created. - -.. this is commented out because in order to turn this into a picture, - we need a rather large chain of python dependencies which includes - natively compiling against libjpeg. That's a huge cost for 1 - diagram that's not clearly useful in that way. - - I suggest we redo this as SVG or something to get the information - without the dependency change. - - .. seqdiag:: - - seqdiag { - edge_length = 250; - span_height = 40; - node_width=200; - default_note_color = lightblue; - - // Use note (put note on rightside) - api [label="Compute.api"]; - manager [label="Compute.manager"]; - api -> manager [label = "create_db_entry_for_new_instance", - note = "VM: Building - Task: Scheduling - Power: No State"]; - manager -> manager [label="_start_building", - note ="VM: Building - Task: None"]; - manager -> manager [label="_allocate_network", - note ="VM: Building - Task: Networking"]; - manager -> manager [label="_prep_block_device", - note ="VM: Building - Task: Block_Device_Mapping"]; - manager -> manager [label="_spawn", - note ="VM: Building - Task: Spawning"]; - api <-- manager [note ="VM: Active - Task: None"]; - } +.. image:: ./images/create_vm_states.svg + :alt: Sequence of VM states, task states, and power states when a new + VM instance is created.