Skip to content

Latest commit

 

History

History
166 lines (117 loc) · 6.62 KB

README.en.md

File metadata and controls

166 lines (117 loc) · 6.62 KB

👉中文版本

Openstack Sequence Diagrams

Draw Openstack operation sequence diagrams using Websequence Diagrams Tool. An easiest way to track the source of Openstack and can be useful for user to learn Openstack or administer to problem troubleshooting. Noted that all these works are based on Openstack Liberty version, it may be changed in the future version, be careful to use if your Openstack version is not Liberty.

Action List

1. Virtual Machine Manager

2. Todo

create cluster

  • Magnum
  • ...

Quick Start

1. Generate diagrams

Before generate the diagrams on your localhost, ensure your machine can access the Internet and the make tools hava been correctly installed.

make

All diagrams generated will be placed in ./output by default.

2. Remove diagrams

To cleanup the diagrams, just run this as follows:

make clean

Some demo

1. Create Server Workflow

create server workflow

2. Reboot Server

reboot server

3. Stop Server

stop server

4. Rebuild Server

rebuild server

Need more diagrams ?

DYI, as you need!

For example:

title pause a server

participant client
participant nova_api

client->nova_api: pause
activate client
activate nova_api

# nova/api/openstack/compute/pause_server.py _pause()
note over nova_api: authrize context
nova_api->database: get instance by uuid
database->nova_api: done

# nova/compute/api.py pause()
note over nova_api: check policy
note over nova_api: check instance lock
note over nova_api: check instance cell
note over nova_api: ensure instance state is ACTIVE
nova_api->database: task_state = PAUSING
database->nova_api: done

note over nova_api: record pause action
# nova/compute/rpcapi.py pause_instance()
nova_api->nova_compute: pause_instance
deactivate nova_api
deactivate client
activate nova_compute

# nova/compute/manager.py pause_instance()
note over nova_compute: notify: pause.start
nova_compute->libvirt: pause
activate libvirt

# nova/virt/libvirt/driver.py pause()
note over libvirt: get domain
note over libvirt: domain.suspend()
libvirt->nova_compute: done
deactivate libvirt
# nova/compute/manager.py pause_instance()
nova_compute->database: vm_state = vm_states.PAUSED\ntask_state = None
database->nova_compute: done
note over nova_compute: notify: pause.end
deactivate nova_compute

Contributors

The following have contributed to this project:

  • AndiaQ
  • int32bit
  • ljjjustin

Many thanks for this! (If I have forgotten you, please let me know and put you in the list of fame. :-))

License

MIT