diff --git a/MANIFEST.in b/MANIFEST.in index 4fe5f0b34b8a..982b727aa27f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -13,9 +13,7 @@ include nova/cloudpipe/client.ovpn.template include nova/compute/fakevirtinstance.xml include nova/compute/interfaces.template include nova/virt/interfaces.template -include nova/virt/libvirt.qemu.xml.template -include nova/virt/libvirt.uml.xml.template -include nova/virt/libvirt.xen.xml.template +include nova/virt/libvirt.*.xml.template include nova/tests/CA/ include nova/tests/CA/cacert.pem include nova/tests/CA/private/ diff --git a/bin/nova-api b/bin/nova-api index a9002ae2d19e..a9c53dbcdf4c 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -38,15 +38,17 @@ from nova import server FLAGS = flags.FLAGS flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port') +flags.DEFINE_string('osapi_host', '0.0.0.0', 'OpenStack API host') flags.DEFINE_integer('ec2api_port', 8773, 'EC2 API port') +flags.DEFINE_string('ec2api_host', '0.0.0.0', 'EC2 API host') def main(_args): from nova import api from nova import wsgi server = wsgi.Server() - server.start(api.API('os'), FLAGS.osapi_port) - server.start(api.API('ec2'), FLAGS.ec2api_port) + server.start(api.API('os'), FLAGS.osapi_port, host=FLAGS.osapi_host) + server.start(api.API('ec2'), FLAGS.ec2api_port, host=FLAGS.ec2api_host) server.wait() diff --git a/contrib/nova.sh b/contrib/nova.sh index 8cbd5f605f80..6033c9e3a301 100755 --- a/contrib/nova.sh +++ b/contrib/nova.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash DIR=`pwd` CMD=$1 -SOURCE_BRANCH=lp:~anso/nova/deploy +SOURCE_BRANCH=lp:nova if [ -n "$2" ]; then SOURCE_BRANCH=$2 fi -DIRNAME=deploy +DIRNAME=nova NOVA_DIR=$DIR/$DIRNAME if [ -n "$3" ]; then NOVA_DIR=$DIR/$3 @@ -17,15 +17,17 @@ if [ ! -n "$HOST_IP" ]; then # you should explicitly set HOST_IP in your environment HOST_IP=`ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'` fi + USE_MYSQL=${USE_MYSQL:-0} MYSQL_PASS=${MYSQL_PASS:-nova} TEST=${TEST:-0} -USE_LDAP=${USE_LDAP:-1} +USE_LDAP=${USE_LDAP:-0} LIBVIRT_TYPE=${LIBVIRT_TYPE:-qemu} -NET_MAN=${NET_MAN:-VlanManager} -# NOTE(vish): If you are using FlatDHCP make sure that this is not your -# public interface. You can comment it out for local usage -BRIDGE_DEV=eth0 +NET_MAN=${NET_MAN:-FlatDHCPManager} +# NOTE(vish): If you are using FlatDHCP on multiple hosts, set the interface +# below but make sure that the interface doesn't already have an +# ip or you risk breaking things. +# FLAT_INTERFACE=eth0 if [ "$USE_MYSQL" == 1 ]; then SQL_CONN=mysql://root:$MYSQL_PASS@localhost/nova @@ -47,7 +49,6 @@ cat >/etc/nova/nova-manage.conf << NOVA_CONF_EOF --FAKE_subdomain=ec2 --network_manager=nova.network.manager.$NET_MAN --cc_host=$HOST_IP ---cc_dmz=$HOST_IP --routing_source_ip=$HOST_IP --sql_connection=$SQL_CONN --auth_driver=nova.auth.$AUTH @@ -120,9 +121,6 @@ if [ "$CMD" == "run" ]; then rm -rf $NOVA_DIR/networks mkdir -p $NOVA_DIR/networks $NOVA_DIR/tools/clean-vlans - sleep 3 - ifdown eth0 - ifup eth0 if [ ! -d "$NOVA_DIR/images" ]; then ln -s $DIR/images $NOVA_DIR/images fi @@ -151,11 +149,6 @@ if [ "$CMD" == "run" ]; then screen_it scheduler "$NOVA_DIR/bin/nova-scheduler --flagfile=/etc/nova/nova-manage.conf" screen_it volume "$NOVA_DIR/bin/nova-volume --flagfile=/etc/nova/nova-manage.conf" screen_it test ". $NOVA_DIR/novarc" - - sleep 3 - - $NOVA_DIR/bin/nova-manage service enable `hostname` nova-compute - $NOVA_DIR/bin/nova-manage service enable `hostname` nova-volume screen -S nova -x fi @@ -179,4 +172,5 @@ if [ "$CMD" == "scrub" ]; then else virsh list | grep i- | awk '{print \$1}' | xargs -n1 virsh destroy fi + vblade-persist ls | grep vol- | awk '{print \$1\" \"\$2}' | xargs -n2 vblade-persist destroy fi diff --git a/contrib/puppet/templates/production/nova-common.conf.erb b/contrib/puppet/templates/production/nova-common.conf.erb index 00c110781941..23ee0c5e8232 100644 --- a/contrib/puppet/templates/production/nova-common.conf.erb +++ b/contrib/puppet/templates/production/nova-common.conf.erb @@ -46,7 +46,6 @@ --quota_gigabytes=100 --use_nova_chains=True --input_chain=services ---FAKE_subdomain=ec2 --use_project_ca=True --fixed_ip_disassociate_timeout=300 --api_max_requests=1 diff --git a/doc/.autogenerated b/doc/.autogenerated new file mode 100644 index 000000000000..3a70f87808d1 --- /dev/null +++ b/doc/.autogenerated @@ -0,0 +1,97 @@ +source/api/nova..adminclient.rst +source/api/nova..api.cloud.rst +source/api/nova..api.ec2.admin.rst +source/api/nova..api.ec2.apirequest.rst +source/api/nova..api.ec2.cloud.rst +source/api/nova..api.ec2.images.rst +source/api/nova..api.ec2.metadatarequesthandler.rst +source/api/nova..api.openstack.auth.rst +source/api/nova..api.openstack.backup_schedules.rst +source/api/nova..api.openstack.faults.rst +source/api/nova..api.openstack.flavors.rst +source/api/nova..api.openstack.images.rst +source/api/nova..api.openstack.servers.rst +source/api/nova..api.openstack.sharedipgroups.rst +source/api/nova..auth.dbdriver.rst +source/api/nova..auth.fakeldap.rst +source/api/nova..auth.ldapdriver.rst +source/api/nova..auth.manager.rst +source/api/nova..auth.signer.rst +source/api/nova..cloudpipe.pipelib.rst +source/api/nova..compute.disk.rst +source/api/nova..compute.instance_types.rst +source/api/nova..compute.manager.rst +source/api/nova..compute.monitor.rst +source/api/nova..compute.power_state.rst +source/api/nova..context.rst +source/api/nova..crypto.rst +source/api/nova..db.api.rst +source/api/nova..db.sqlalchemy.api.rst +source/api/nova..db.sqlalchemy.models.rst +source/api/nova..db.sqlalchemy.session.rst +source/api/nova..exception.rst +source/api/nova..fakerabbit.rst +source/api/nova..flags.rst +source/api/nova..image.service.rst +source/api/nova..manager.rst +source/api/nova..network.linux_net.rst +source/api/nova..network.manager.rst +source/api/nova..objectstore.bucket.rst +source/api/nova..objectstore.handler.rst +source/api/nova..objectstore.image.rst +source/api/nova..objectstore.stored.rst +source/api/nova..process.rst +source/api/nova..quota.rst +source/api/nova..rpc.rst +source/api/nova..scheduler.chance.rst +source/api/nova..scheduler.driver.rst +source/api/nova..scheduler.manager.rst +source/api/nova..scheduler.simple.rst +source/api/nova..server.rst +source/api/nova..service.rst +source/api/nova..test.rst +source/api/nova..tests.access_unittest.rst +source/api/nova..tests.api.fakes.rst +source/api/nova..tests.api.openstack.fakes.rst +source/api/nova..tests.api.openstack.test_api.rst +source/api/nova..tests.api.openstack.test_auth.rst +source/api/nova..tests.api.openstack.test_faults.rst +source/api/nova..tests.api.openstack.test_flavors.rst +source/api/nova..tests.api.openstack.test_images.rst +source/api/nova..tests.api.openstack.test_ratelimiting.rst +source/api/nova..tests.api.openstack.test_servers.rst +source/api/nova..tests.api.openstack.test_sharedipgroups.rst +source/api/nova..tests.api.test_wsgi.rst +source/api/nova..tests.api_integration.rst +source/api/nova..tests.api_unittest.rst +source/api/nova..tests.auth_unittest.rst +source/api/nova..tests.cloud_unittest.rst +source/api/nova..tests.compute_unittest.rst +source/api/nova..tests.declare_flags.rst +source/api/nova..tests.fake_flags.rst +source/api/nova..tests.flags_unittest.rst +source/api/nova..tests.network_unittest.rst +source/api/nova..tests.objectstore_unittest.rst +source/api/nova..tests.process_unittest.rst +source/api/nova..tests.quota_unittest.rst +source/api/nova..tests.real_flags.rst +source/api/nova..tests.rpc_unittest.rst +source/api/nova..tests.runtime_flags.rst +source/api/nova..tests.scheduler_unittest.rst +source/api/nova..tests.service_unittest.rst +source/api/nova..tests.twistd_unittest.rst +source/api/nova..tests.validator_unittest.rst +source/api/nova..tests.virt_unittest.rst +source/api/nova..tests.volume_unittest.rst +source/api/nova..twistd.rst +source/api/nova..utils.rst +source/api/nova..validate.rst +source/api/nova..virt.connection.rst +source/api/nova..virt.fake.rst +source/api/nova..virt.images.rst +source/api/nova..virt.libvirt_conn.rst +source/api/nova..virt.xenapi.rst +source/api/nova..volume.driver.rst +source/api/nova..volume.manager.rst +source/api/nova..wsgi.rst +source/api/autoindex.rst diff --git a/doc/build/.placeholder b/doc/build/.placeholder deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/doc/source/_templates/.DS_Store b/doc/source/_templates/.DS_Store deleted file mode 100644 index 5008ddfcf53c..000000000000 Binary files a/doc/source/_templates/.DS_Store and /dev/null differ diff --git a/doc/source/adminguide/getting.started.rst b/doc/source/adminguide/getting.started.rst index 7075a0b02f9d..3e8073606920 100644 --- a/doc/source/adminguide/getting.started.rst +++ b/doc/source/adminguide/getting.started.rst @@ -140,7 +140,6 @@ A sample configuration to test the system follows:: --verbose --nodaemon - --FAKE_subdomain=ec2 --auth_driver=nova.auth.dbdriver.DbDriver Running diff --git a/doc/source/adminguide/multi.node.install.rst b/doc/source/adminguide/multi.node.install.rst index fa0652bc87e6..dcceb539bf9c 100644 --- a/doc/source/adminguide/multi.node.install.rst +++ b/doc/source/adminguide/multi.node.install.rst @@ -92,7 +92,6 @@ Note: CC_ADDR= :: - --FAKE_subdomain=ec2 # workaround for ec2/euca api --fixed_range= # ip network to use for VM guests, ex 192.168.2.64/26 --network_size=<# of addrs> # number of ip addrs to use for VM guests, ex 64 @@ -104,19 +103,13 @@ Note: CC_ADDR= --fixed_range= # ip network to use for VM guests, ex 192.168.2.64/26 --network_size=<# of addrs> # number of ip addrs to use for VM guests, ex 64 -4. nova-api specific flags - -:: - - --FAKE_subdomain=ec2 # workaround for ec2/euca api - -5. Create a nova group +4. Create a nova group :: sudo addgroup nova -6. nova-objectstore specific flags < no specific config needed > +5. nova-objectstore specific flags < no specific config needed > Config files should be have their owner set to root:nova, and mode set to 0640, since they contain your MySQL server's root password. diff --git a/doc/source/adminguide/network.vlan.rst b/doc/source/adminguide/network.vlan.rst index a7cccc098762..5bbc54bed53e 100644 --- a/doc/source/adminguide/network.vlan.rst +++ b/doc/source/adminguide/network.vlan.rst @@ -31,8 +31,9 @@ In this mode, each project gets its own VLAN, Linux networking bridge, and subne In the VLAN network mode, all the VM instances of a project are connected together in a VLAN with the specified private subnet. Each running VM instance is assigned an IP address within the given private subnet. -.. todo:: Insert Figure 2 from "An OpenStack Network Overview" contributed by Citrix - +.. image:: /images/Novadiagram.png + :width: 790 + While network traffic between VM instances belonging to the same VLAN is always open, Nova can enforce isolation of network traffic between different projects by enforcing one VLAN per project. In addition, the network administrator can specify a pool of public IP addresses that users may allocate and then assign to VMs, either at boot or dynamically at run-time. This capability is similar to Amazon's 'elastic IPs'. A public IP address may be associated with a running instances, allowing the VM instance to be accessed from the public network. The public IP addresses are accessible from the network host and NATed to the private IP address of the project. diff --git a/doc/source/adminguide/nova.manage.rst b/doc/source/adminguide/nova.manage.rst index 89fb396691e6..0e5c4e06249e 100644 --- a/doc/source/adminguide/nova.manage.rst +++ b/doc/source/adminguide/nova.manage.rst @@ -27,37 +27,149 @@ administration and ongoing maintenance of nova, such as user creation, vpn management, and much more. The standard pattern for executing a nova-manage command is: - ``nova-manage []`` For example, to obtain a list of all projects: - ``nova-manage project list`` -You can run without arguments to see a list of available command categories: - +Run without arguments to see a list of available command categories: ``nova-manage`` -You can run with a category argument to see a list of all commands in that -category: +Categories are user, project, role, shell, vpn, and floating. Detailed descriptions are below. +You can also run with a category argument such as user to see a list of all commands in that category: ``nova-manage user`` +These sections describe the available categories and arguments for nova-manage. + +Nova User +~~~~~~~~~ + +``nova-manage user admin `` + + Create an admin user with the name . + +``nova-manage user create `` + + Create a normal user with the name . + +``nova-manage user delete `` + + Delete the user with the name . + +``nova-manage user exports `` + + Outputs a list of access key and secret keys for user to the screen + +``nova-manage user list`` + + Outputs a list of all the user names to the screen. + +``nova-manage user modify `` + + Updates the indicated user keys, indicating with T or F if the user is an admin user. Leave any argument blank if you do not want to update it. + +Nova Project +~~~~~~~~~~~~ + +``nova-manage project add `` + + Add a nova project with the name to the database. + +``nova-manage project create `` + + Create a new nova project with the name (you still need to do nova-manage project add to add it to the database). + +``nova-manage project delete `` + + Delete a nova project with the name . + +``nova-manage project environment `` + + Exports environment variables for the named project to a file named novarc. + +``nova-manage project list`` + + Outputs a list of all the projects to the screen. + +``nova-manage project quota `` + + Outputs the size and specs of the project's instances including gigabytes, instances, floating IPs, volumes, and cores. + +``nova-manage project remove `` + + Deletes the project with the name . + +``nova-manage project zipfile`` + + Compresses all related files for a created project into a zip file nova.zip. + +Nova Role +~~~~~~~~~ + +nova-manage role [] +``nova-manage role add <(optional) projectname>`` + + Add a user to either a global or project-based role with the indicated assigned to the named user. Role names can be one of the following five roles: admin, itsec, projectmanager, netadmin, developer. If you add the project name as the last argument then the role is assigned just for that project, otherwise the user is assigned the named role for all projects. + +``nova-manage role has `` + Checks the user or project and responds with True if the user has a global role with a particular project. + +``nova-manage role remove `` + Remove the indicated role from the user. Nova Shell ~~~~~~~~~~ -* shell bpython - * start a new bpython shell -* shell ipython - * start a new ipython shell -* shell python - * start a new python shell -* shell run - * ??? -* shell script: Runs the script from the specifed path with flags set properly. - * arguments: path +``nova-manage shell bpython`` + Starts a new bpython shell. + +``nova-manage shell ipython`` + + Starts a new ipython shell. + +``nova-manage shell python`` + + Starts a new python shell. + +``nova-manage shell run`` + + Starts a new shell using python. + +``nova-manage shell script `` + + Runs the named script from the specified path with flags set. + +Nova VPN +~~~~~~~~ + +``nova-manage vpn list`` + + Displays a list of projects, their IP prot numbers, and what state they're in. + +``nova-manage vpn run `` + + Starts the VPN for the named project. + +``nova-manage vpn spawn`` + + Runs all VPNs. + +Nova Floating IPs +~~~~~~~~~~~~~~~~~ + +``nova-manage floating create `` + + Creates floating IP addresses for the named host by the given range. + +``nova-manage floating delete `` + + Deletes floating IP addresses in the range given. + +``nova-manage floating list`` + + Displays a list of all floating IP addresses. Concept: Flags -------------- diff --git a/doc/source/api/autoindex.rst b/doc/source/api/autoindex.rst new file mode 100644 index 000000000000..6265b082be52 --- /dev/null +++ b/doc/source/api/autoindex.rst @@ -0,0 +1,99 @@ +.. toctree:: + :maxdepth: 1 + + nova..adminclient.rst + nova..api.cloud.rst + nova..api.ec2.admin.rst + nova..api.ec2.apirequest.rst + nova..api.ec2.cloud.rst + nova..api.ec2.images.rst + nova..api.ec2.metadatarequesthandler.rst + nova..api.openstack.auth.rst + nova..api.openstack.backup_schedules.rst + nova..api.openstack.faults.rst + nova..api.openstack.flavors.rst + nova..api.openstack.images.rst + nova..api.openstack.servers.rst + nova..api.openstack.sharedipgroups.rst + nova..auth.dbdriver.rst + nova..auth.fakeldap.rst + nova..auth.ldapdriver.rst + nova..auth.manager.rst + nova..auth.signer.rst + nova..cloudpipe.pipelib.rst + nova..compute.disk.rst + nova..compute.instance_types.rst + nova..compute.manager.rst + nova..compute.monitor.rst + nova..compute.power_state.rst + nova..context.rst + nova..crypto.rst + nova..db.api.rst + nova..db.sqlalchemy.api.rst + nova..db.sqlalchemy.models.rst + nova..db.sqlalchemy.session.rst + nova..exception.rst + nova..fakerabbit.rst + nova..flags.rst + nova..image.service.rst + nova..manager.rst + nova..network.linux_net.rst + nova..network.manager.rst + nova..objectstore.bucket.rst + nova..objectstore.handler.rst + nova..objectstore.image.rst + nova..objectstore.stored.rst + nova..process.rst + nova..quota.rst + nova..rpc.rst + nova..scheduler.chance.rst + nova..scheduler.driver.rst + nova..scheduler.manager.rst + nova..scheduler.simple.rst + nova..server.rst + nova..service.rst + nova..test.rst + nova..tests.access_unittest.rst + nova..tests.api.fakes.rst + nova..tests.api.openstack.fakes.rst + nova..tests.api.openstack.test_api.rst + nova..tests.api.openstack.test_auth.rst + nova..tests.api.openstack.test_faults.rst + nova..tests.api.openstack.test_flavors.rst + nova..tests.api.openstack.test_images.rst + nova..tests.api.openstack.test_ratelimiting.rst + nova..tests.api.openstack.test_servers.rst + nova..tests.api.openstack.test_sharedipgroups.rst + nova..tests.api.test_wsgi.rst + nova..tests.api_integration.rst + nova..tests.api_unittest.rst + nova..tests.auth_unittest.rst + nova..tests.cloud_unittest.rst + nova..tests.compute_unittest.rst + nova..tests.declare_flags.rst + nova..tests.fake_flags.rst + nova..tests.flags_unittest.rst + nova..tests.network_unittest.rst + nova..tests.objectstore_unittest.rst + nova..tests.process_unittest.rst + nova..tests.quota_unittest.rst + nova..tests.real_flags.rst + nova..tests.rpc_unittest.rst + nova..tests.runtime_flags.rst + nova..tests.scheduler_unittest.rst + nova..tests.service_unittest.rst + nova..tests.twistd_unittest.rst + nova..tests.validator_unittest.rst + nova..tests.virt_unittest.rst + nova..tests.volume_unittest.rst + nova..twistd.rst + nova..utils.rst + nova..validate.rst + nova..virt.connection.rst + nova..virt.fake.rst + nova..virt.images.rst + nova..virt.libvirt_conn.rst + nova..virt.xenapi.rst + nova..volume.driver.rst + nova..volume.manager.rst + nova..wsgi.rst diff --git a/doc/source/api/nova..adminclient.rst b/doc/source/api/nova..adminclient.rst new file mode 100644 index 000000000000..35fa839e1b1b --- /dev/null +++ b/doc/source/api/nova..adminclient.rst @@ -0,0 +1,6 @@ +The :mod:`nova..adminclient` Module +============================================================================== +.. automodule:: nova..adminclient + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.cloud.rst b/doc/source/api/nova..api.cloud.rst new file mode 100644 index 000000000000..4138401858ea --- /dev/null +++ b/doc/source/api/nova..api.cloud.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.cloud` Module +============================================================================== +.. automodule:: nova..api.cloud + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.ec2.admin.rst b/doc/source/api/nova..api.ec2.admin.rst new file mode 100644 index 000000000000..4e9ab308b4dd --- /dev/null +++ b/doc/source/api/nova..api.ec2.admin.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.ec2.admin` Module +============================================================================== +.. automodule:: nova..api.ec2.admin + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.ec2.apirequest.rst b/doc/source/api/nova..api.ec2.apirequest.rst new file mode 100644 index 000000000000..c17a2ff3ad29 --- /dev/null +++ b/doc/source/api/nova..api.ec2.apirequest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.ec2.apirequest` Module +============================================================================== +.. automodule:: nova..api.ec2.apirequest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.ec2.cloud.rst b/doc/source/api/nova..api.ec2.cloud.rst new file mode 100644 index 000000000000..f6145c217f8c --- /dev/null +++ b/doc/source/api/nova..api.ec2.cloud.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.ec2.cloud` Module +============================================================================== +.. automodule:: nova..api.ec2.cloud + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.ec2.images.rst b/doc/source/api/nova..api.ec2.images.rst new file mode 100644 index 000000000000..012d800e47fb --- /dev/null +++ b/doc/source/api/nova..api.ec2.images.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.ec2.images` Module +============================================================================== +.. automodule:: nova..api.ec2.images + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.ec2.metadatarequesthandler.rst b/doc/source/api/nova..api.ec2.metadatarequesthandler.rst new file mode 100644 index 000000000000..75f5169e5f27 --- /dev/null +++ b/doc/source/api/nova..api.ec2.metadatarequesthandler.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.ec2.metadatarequesthandler` Module +============================================================================== +.. automodule:: nova..api.ec2.metadatarequesthandler + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.openstack.auth.rst b/doc/source/api/nova..api.openstack.auth.rst new file mode 100644 index 000000000000..8c3f8f2da626 --- /dev/null +++ b/doc/source/api/nova..api.openstack.auth.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.openstack.auth` Module +============================================================================== +.. automodule:: nova..api.openstack.auth + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.openstack.backup_schedules.rst b/doc/source/api/nova..api.openstack.backup_schedules.rst new file mode 100644 index 000000000000..6b406f12db4b --- /dev/null +++ b/doc/source/api/nova..api.openstack.backup_schedules.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.openstack.backup_schedules` Module +============================================================================== +.. automodule:: nova..api.openstack.backup_schedules + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.openstack.faults.rst b/doc/source/api/nova..api.openstack.faults.rst new file mode 100644 index 000000000000..7b25561f74b7 --- /dev/null +++ b/doc/source/api/nova..api.openstack.faults.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.openstack.faults` Module +============================================================================== +.. automodule:: nova..api.openstack.faults + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.openstack.flavors.rst b/doc/source/api/nova..api.openstack.flavors.rst new file mode 100644 index 000000000000..0deb724deba1 --- /dev/null +++ b/doc/source/api/nova..api.openstack.flavors.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.openstack.flavors` Module +============================================================================== +.. automodule:: nova..api.openstack.flavors + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.openstack.images.rst b/doc/source/api/nova..api.openstack.images.rst new file mode 100644 index 000000000000..82bd5f1e86a3 --- /dev/null +++ b/doc/source/api/nova..api.openstack.images.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.openstack.images` Module +============================================================================== +.. automodule:: nova..api.openstack.images + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.openstack.servers.rst b/doc/source/api/nova..api.openstack.servers.rst new file mode 100644 index 000000000000..c36856ea2bc5 --- /dev/null +++ b/doc/source/api/nova..api.openstack.servers.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.openstack.servers` Module +============================================================================== +.. automodule:: nova..api.openstack.servers + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..api.openstack.sharedipgroups.rst b/doc/source/api/nova..api.openstack.sharedipgroups.rst new file mode 100644 index 000000000000..07632acc8e49 --- /dev/null +++ b/doc/source/api/nova..api.openstack.sharedipgroups.rst @@ -0,0 +1,6 @@ +The :mod:`nova..api.openstack.sharedipgroups` Module +============================================================================== +.. automodule:: nova..api.openstack.sharedipgroups + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..auth.dbdriver.rst b/doc/source/api/nova..auth.dbdriver.rst new file mode 100644 index 000000000000..7de68b6e08bc --- /dev/null +++ b/doc/source/api/nova..auth.dbdriver.rst @@ -0,0 +1,6 @@ +The :mod:`nova..auth.dbdriver` Module +============================================================================== +.. automodule:: nova..auth.dbdriver + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..auth.fakeldap.rst b/doc/source/api/nova..auth.fakeldap.rst new file mode 100644 index 000000000000..ca8a3ad4d560 --- /dev/null +++ b/doc/source/api/nova..auth.fakeldap.rst @@ -0,0 +1,6 @@ +The :mod:`nova..auth.fakeldap` Module +============================================================================== +.. automodule:: nova..auth.fakeldap + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..auth.ldapdriver.rst b/doc/source/api/nova..auth.ldapdriver.rst new file mode 100644 index 000000000000..c444635228f8 --- /dev/null +++ b/doc/source/api/nova..auth.ldapdriver.rst @@ -0,0 +1,6 @@ +The :mod:`nova..auth.ldapdriver` Module +============================================================================== +.. automodule:: nova..auth.ldapdriver + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..auth.manager.rst b/doc/source/api/nova..auth.manager.rst new file mode 100644 index 000000000000..bc5ce2ec31e8 --- /dev/null +++ b/doc/source/api/nova..auth.manager.rst @@ -0,0 +1,6 @@ +The :mod:`nova..auth.manager` Module +============================================================================== +.. automodule:: nova..auth.manager + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..auth.signer.rst b/doc/source/api/nova..auth.signer.rst new file mode 100644 index 000000000000..aad824eada39 --- /dev/null +++ b/doc/source/api/nova..auth.signer.rst @@ -0,0 +1,6 @@ +The :mod:`nova..auth.signer` Module +============================================================================== +.. automodule:: nova..auth.signer + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..cloudpipe.pipelib.rst b/doc/source/api/nova..cloudpipe.pipelib.rst new file mode 100644 index 000000000000..054aaf484fe2 --- /dev/null +++ b/doc/source/api/nova..cloudpipe.pipelib.rst @@ -0,0 +1,6 @@ +The :mod:`nova..cloudpipe.pipelib` Module +============================================================================== +.. automodule:: nova..cloudpipe.pipelib + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..compute.disk.rst b/doc/source/api/nova..compute.disk.rst new file mode 100644 index 000000000000..6410af6f3899 --- /dev/null +++ b/doc/source/api/nova..compute.disk.rst @@ -0,0 +1,6 @@ +The :mod:`nova..compute.disk` Module +============================================================================== +.. automodule:: nova..compute.disk + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..compute.instance_types.rst b/doc/source/api/nova..compute.instance_types.rst new file mode 100644 index 000000000000..d206ff3a4a1f --- /dev/null +++ b/doc/source/api/nova..compute.instance_types.rst @@ -0,0 +1,6 @@ +The :mod:`nova..compute.instance_types` Module +============================================================================== +.. automodule:: nova..compute.instance_types + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..compute.manager.rst b/doc/source/api/nova..compute.manager.rst new file mode 100644 index 000000000000..33a337c39843 --- /dev/null +++ b/doc/source/api/nova..compute.manager.rst @@ -0,0 +1,6 @@ +The :mod:`nova..compute.manager` Module +============================================================================== +.. automodule:: nova..compute.manager + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..compute.monitor.rst b/doc/source/api/nova..compute.monitor.rst new file mode 100644 index 000000000000..a91169ecd309 --- /dev/null +++ b/doc/source/api/nova..compute.monitor.rst @@ -0,0 +1,6 @@ +The :mod:`nova..compute.monitor` Module +============================================================================== +.. automodule:: nova..compute.monitor + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..compute.power_state.rst b/doc/source/api/nova..compute.power_state.rst new file mode 100644 index 000000000000..41b1080e5a0e --- /dev/null +++ b/doc/source/api/nova..compute.power_state.rst @@ -0,0 +1,6 @@ +The :mod:`nova..compute.power_state` Module +============================================================================== +.. automodule:: nova..compute.power_state + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..context.rst b/doc/source/api/nova..context.rst new file mode 100644 index 000000000000..9de1adb24827 --- /dev/null +++ b/doc/source/api/nova..context.rst @@ -0,0 +1,6 @@ +The :mod:`nova..context` Module +============================================================================== +.. automodule:: nova..context + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..crypto.rst b/doc/source/api/nova..crypto.rst new file mode 100644 index 000000000000..af9f636344ab --- /dev/null +++ b/doc/source/api/nova..crypto.rst @@ -0,0 +1,6 @@ +The :mod:`nova..crypto` Module +============================================================================== +.. automodule:: nova..crypto + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..db.api.rst b/doc/source/api/nova..db.api.rst new file mode 100644 index 000000000000..6d998fbb2f90 --- /dev/null +++ b/doc/source/api/nova..db.api.rst @@ -0,0 +1,6 @@ +The :mod:`nova..db.api` Module +============================================================================== +.. automodule:: nova..db.api + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..db.sqlalchemy.api.rst b/doc/source/api/nova..db.sqlalchemy.api.rst new file mode 100644 index 000000000000..76d0c1bd376f --- /dev/null +++ b/doc/source/api/nova..db.sqlalchemy.api.rst @@ -0,0 +1,6 @@ +The :mod:`nova..db.sqlalchemy.api` Module +============================================================================== +.. automodule:: nova..db.sqlalchemy.api + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..db.sqlalchemy.models.rst b/doc/source/api/nova..db.sqlalchemy.models.rst new file mode 100644 index 000000000000..9c795d7f51f5 --- /dev/null +++ b/doc/source/api/nova..db.sqlalchemy.models.rst @@ -0,0 +1,6 @@ +The :mod:`nova..db.sqlalchemy.models` Module +============================================================================== +.. automodule:: nova..db.sqlalchemy.models + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..db.sqlalchemy.session.rst b/doc/source/api/nova..db.sqlalchemy.session.rst new file mode 100644 index 000000000000..cbfd6416a888 --- /dev/null +++ b/doc/source/api/nova..db.sqlalchemy.session.rst @@ -0,0 +1,6 @@ +The :mod:`nova..db.sqlalchemy.session` Module +============================================================================== +.. automodule:: nova..db.sqlalchemy.session + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..exception.rst b/doc/source/api/nova..exception.rst new file mode 100644 index 000000000000..97ac6b752d27 --- /dev/null +++ b/doc/source/api/nova..exception.rst @@ -0,0 +1,6 @@ +The :mod:`nova..exception` Module +============================================================================== +.. automodule:: nova..exception + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..fakerabbit.rst b/doc/source/api/nova..fakerabbit.rst new file mode 100644 index 000000000000..f1e27c2664fb --- /dev/null +++ b/doc/source/api/nova..fakerabbit.rst @@ -0,0 +1,6 @@ +The :mod:`nova..fakerabbit` Module +============================================================================== +.. automodule:: nova..fakerabbit + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..flags.rst b/doc/source/api/nova..flags.rst new file mode 100644 index 000000000000..08165be44f46 --- /dev/null +++ b/doc/source/api/nova..flags.rst @@ -0,0 +1,6 @@ +The :mod:`nova..flags` Module +============================================================================== +.. automodule:: nova..flags + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..image.service.rst b/doc/source/api/nova..image.service.rst new file mode 100644 index 000000000000..78ef1eccadac --- /dev/null +++ b/doc/source/api/nova..image.service.rst @@ -0,0 +1,6 @@ +The :mod:`nova..image.service` Module +============================================================================== +.. automodule:: nova..image.service + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..manager.rst b/doc/source/api/nova..manager.rst new file mode 100644 index 000000000000..576902491c7e --- /dev/null +++ b/doc/source/api/nova..manager.rst @@ -0,0 +1,6 @@ +The :mod:`nova..manager` Module +============================================================================== +.. automodule:: nova..manager + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..network.linux_net.rst b/doc/source/api/nova..network.linux_net.rst new file mode 100644 index 000000000000..7af78d5ade7f --- /dev/null +++ b/doc/source/api/nova..network.linux_net.rst @@ -0,0 +1,6 @@ +The :mod:`nova..network.linux_net` Module +============================================================================== +.. automodule:: nova..network.linux_net + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..network.manager.rst b/doc/source/api/nova..network.manager.rst new file mode 100644 index 000000000000..0ea70553325e --- /dev/null +++ b/doc/source/api/nova..network.manager.rst @@ -0,0 +1,6 @@ +The :mod:`nova..network.manager` Module +============================================================================== +.. automodule:: nova..network.manager + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..objectstore.bucket.rst b/doc/source/api/nova..objectstore.bucket.rst new file mode 100644 index 000000000000..3bfdf639ccd4 --- /dev/null +++ b/doc/source/api/nova..objectstore.bucket.rst @@ -0,0 +1,6 @@ +The :mod:`nova..objectstore.bucket` Module +============================================================================== +.. automodule:: nova..objectstore.bucket + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..objectstore.handler.rst b/doc/source/api/nova..objectstore.handler.rst new file mode 100644 index 000000000000..0eb8c4efb497 --- /dev/null +++ b/doc/source/api/nova..objectstore.handler.rst @@ -0,0 +1,6 @@ +The :mod:`nova..objectstore.handler` Module +============================================================================== +.. automodule:: nova..objectstore.handler + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..objectstore.image.rst b/doc/source/api/nova..objectstore.image.rst new file mode 100644 index 000000000000..fa4c971f119a --- /dev/null +++ b/doc/source/api/nova..objectstore.image.rst @@ -0,0 +1,6 @@ +The :mod:`nova..objectstore.image` Module +============================================================================== +.. automodule:: nova..objectstore.image + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..objectstore.stored.rst b/doc/source/api/nova..objectstore.stored.rst new file mode 100644 index 000000000000..2b1d997a3fd0 --- /dev/null +++ b/doc/source/api/nova..objectstore.stored.rst @@ -0,0 +1,6 @@ +The :mod:`nova..objectstore.stored` Module +============================================================================== +.. automodule:: nova..objectstore.stored + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..process.rst b/doc/source/api/nova..process.rst new file mode 100644 index 000000000000..91eff8379070 --- /dev/null +++ b/doc/source/api/nova..process.rst @@ -0,0 +1,6 @@ +The :mod:`nova..process` Module +============================================================================== +.. automodule:: nova..process + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..quota.rst b/doc/source/api/nova..quota.rst new file mode 100644 index 000000000000..4140d95d66ac --- /dev/null +++ b/doc/source/api/nova..quota.rst @@ -0,0 +1,6 @@ +The :mod:`nova..quota` Module +============================================================================== +.. automodule:: nova..quota + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..rpc.rst b/doc/source/api/nova..rpc.rst new file mode 100644 index 000000000000..5b2a9b8e2333 --- /dev/null +++ b/doc/source/api/nova..rpc.rst @@ -0,0 +1,6 @@ +The :mod:`nova..rpc` Module +============================================================================== +.. automodule:: nova..rpc + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..scheduler.chance.rst b/doc/source/api/nova..scheduler.chance.rst new file mode 100644 index 000000000000..89c074c8f6c7 --- /dev/null +++ b/doc/source/api/nova..scheduler.chance.rst @@ -0,0 +1,6 @@ +The :mod:`nova..scheduler.chance` Module +============================================================================== +.. automodule:: nova..scheduler.chance + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..scheduler.driver.rst b/doc/source/api/nova..scheduler.driver.rst new file mode 100644 index 000000000000..793ed9c7b3ae --- /dev/null +++ b/doc/source/api/nova..scheduler.driver.rst @@ -0,0 +1,6 @@ +The :mod:`nova..scheduler.driver` Module +============================================================================== +.. automodule:: nova..scheduler.driver + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..scheduler.manager.rst b/doc/source/api/nova..scheduler.manager.rst new file mode 100644 index 000000000000..d0fc7c4230db --- /dev/null +++ b/doc/source/api/nova..scheduler.manager.rst @@ -0,0 +1,6 @@ +The :mod:`nova..scheduler.manager` Module +============================================================================== +.. automodule:: nova..scheduler.manager + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..scheduler.simple.rst b/doc/source/api/nova..scheduler.simple.rst new file mode 100644 index 000000000000..dacc2cf3088c --- /dev/null +++ b/doc/source/api/nova..scheduler.simple.rst @@ -0,0 +1,6 @@ +The :mod:`nova..scheduler.simple` Module +============================================================================== +.. automodule:: nova..scheduler.simple + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..server.rst b/doc/source/api/nova..server.rst new file mode 100644 index 000000000000..7cb2cfa5465d --- /dev/null +++ b/doc/source/api/nova..server.rst @@ -0,0 +1,6 @@ +The :mod:`nova..server` Module +============================================================================== +.. automodule:: nova..server + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..service.rst b/doc/source/api/nova..service.rst new file mode 100644 index 000000000000..2d2dfcf2e52a --- /dev/null +++ b/doc/source/api/nova..service.rst @@ -0,0 +1,6 @@ +The :mod:`nova..service` Module +============================================================================== +.. automodule:: nova..service + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..test.rst b/doc/source/api/nova..test.rst new file mode 100644 index 000000000000..a6bdb6f1fffa --- /dev/null +++ b/doc/source/api/nova..test.rst @@ -0,0 +1,6 @@ +The :mod:`nova..test` Module +============================================================================== +.. automodule:: nova..test + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.access_unittest.rst b/doc/source/api/nova..tests.access_unittest.rst new file mode 100644 index 000000000000..89554e430a4f --- /dev/null +++ b/doc/source/api/nova..tests.access_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.access_unittest` Module +============================================================================== +.. automodule:: nova..tests.access_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.fakes.rst b/doc/source/api/nova..tests.api.fakes.rst new file mode 100644 index 000000000000..5728b18f3616 --- /dev/null +++ b/doc/source/api/nova..tests.api.fakes.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.fakes` Module +============================================================================== +.. automodule:: nova..tests.api.fakes + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.fakes.rst b/doc/source/api/nova..tests.api.openstack.fakes.rst new file mode 100644 index 000000000000..4a9ff593899f --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.fakes.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.fakes` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.fakes + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_api.rst b/doc/source/api/nova..tests.api.openstack.test_api.rst new file mode 100644 index 000000000000..68106d221f83 --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_api.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_api` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_api + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_auth.rst b/doc/source/api/nova..tests.api.openstack.test_auth.rst new file mode 100644 index 000000000000..9f0011669a88 --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_auth.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_auth` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_auth + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_faults.rst b/doc/source/api/nova..tests.api.openstack.test_faults.rst new file mode 100644 index 000000000000..b839ae8a3c77 --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_faults.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_faults` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_faults + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_flavors.rst b/doc/source/api/nova..tests.api.openstack.test_flavors.rst new file mode 100644 index 000000000000..471fac56ec84 --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_flavors.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_flavors` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_flavors + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_images.rst b/doc/source/api/nova..tests.api.openstack.test_images.rst new file mode 100644 index 000000000000..57ae93c8c63e --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_images.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_images` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_images + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_ratelimiting.rst b/doc/source/api/nova..tests.api.openstack.test_ratelimiting.rst new file mode 100644 index 000000000000..9a857f795941 --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_ratelimiting.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_ratelimiting` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_ratelimiting + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_servers.rst b/doc/source/api/nova..tests.api.openstack.test_servers.rst new file mode 100644 index 000000000000..ea602e6ab16c --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_servers.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_servers` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_servers + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.openstack.test_sharedipgroups.rst b/doc/source/api/nova..tests.api.openstack.test_sharedipgroups.rst new file mode 100644 index 000000000000..1fad49147d62 --- /dev/null +++ b/doc/source/api/nova..tests.api.openstack.test_sharedipgroups.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.openstack.test_sharedipgroups` Module +============================================================================== +.. automodule:: nova..tests.api.openstack.test_sharedipgroups + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api.test_wsgi.rst b/doc/source/api/nova..tests.api.test_wsgi.rst new file mode 100644 index 000000000000..8e79caa4dd73 --- /dev/null +++ b/doc/source/api/nova..tests.api.test_wsgi.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api.test_wsgi` Module +============================================================================== +.. automodule:: nova..tests.api.test_wsgi + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api_integration.rst b/doc/source/api/nova..tests.api_integration.rst new file mode 100644 index 000000000000..fd217acf73c0 --- /dev/null +++ b/doc/source/api/nova..tests.api_integration.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api_integration` Module +============================================================================== +.. automodule:: nova..tests.api_integration + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.api_unittest.rst b/doc/source/api/nova..tests.api_unittest.rst new file mode 100644 index 000000000000..44a65d48c463 --- /dev/null +++ b/doc/source/api/nova..tests.api_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.api_unittest` Module +============================================================================== +.. automodule:: nova..tests.api_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.auth_unittest.rst b/doc/source/api/nova..tests.auth_unittest.rst new file mode 100644 index 000000000000..5805dcf38b8e --- /dev/null +++ b/doc/source/api/nova..tests.auth_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.auth_unittest` Module +============================================================================== +.. automodule:: nova..tests.auth_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.cloud_unittest.rst b/doc/source/api/nova..tests.cloud_unittest.rst new file mode 100644 index 000000000000..d2ca3b013579 --- /dev/null +++ b/doc/source/api/nova..tests.cloud_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.cloud_unittest` Module +============================================================================== +.. automodule:: nova..tests.cloud_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.compute_unittest.rst b/doc/source/api/nova..tests.compute_unittest.rst new file mode 100644 index 000000000000..6a30bf7441f7 --- /dev/null +++ b/doc/source/api/nova..tests.compute_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.compute_unittest` Module +============================================================================== +.. automodule:: nova..tests.compute_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.declare_flags.rst b/doc/source/api/nova..tests.declare_flags.rst new file mode 100644 index 000000000000..524e72e9133d --- /dev/null +++ b/doc/source/api/nova..tests.declare_flags.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.declare_flags` Module +============================================================================== +.. automodule:: nova..tests.declare_flags + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.fake_flags.rst b/doc/source/api/nova..tests.fake_flags.rst new file mode 100644 index 000000000000..a8dc3df36efe --- /dev/null +++ b/doc/source/api/nova..tests.fake_flags.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.fake_flags` Module +============================================================================== +.. automodule:: nova..tests.fake_flags + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.flags_unittest.rst b/doc/source/api/nova..tests.flags_unittest.rst new file mode 100644 index 000000000000..61087e683336 --- /dev/null +++ b/doc/source/api/nova..tests.flags_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.flags_unittest` Module +============================================================================== +.. automodule:: nova..tests.flags_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.network_unittest.rst b/doc/source/api/nova..tests.network_unittest.rst new file mode 100644 index 000000000000..df057d813efb --- /dev/null +++ b/doc/source/api/nova..tests.network_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.network_unittest` Module +============================================================================== +.. automodule:: nova..tests.network_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.objectstore_unittest.rst b/doc/source/api/nova..tests.objectstore_unittest.rst new file mode 100644 index 000000000000..0ae252f049c7 --- /dev/null +++ b/doc/source/api/nova..tests.objectstore_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.objectstore_unittest` Module +============================================================================== +.. automodule:: nova..tests.objectstore_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.process_unittest.rst b/doc/source/api/nova..tests.process_unittest.rst new file mode 100644 index 000000000000..30d1e129c942 --- /dev/null +++ b/doc/source/api/nova..tests.process_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.process_unittest` Module +============================================================================== +.. automodule:: nova..tests.process_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.quota_unittest.rst b/doc/source/api/nova..tests.quota_unittest.rst new file mode 100644 index 000000000000..6ab81310489d --- /dev/null +++ b/doc/source/api/nova..tests.quota_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.quota_unittest` Module +============================================================================== +.. automodule:: nova..tests.quota_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.real_flags.rst b/doc/source/api/nova..tests.real_flags.rst new file mode 100644 index 000000000000..e9c0d1abdc66 --- /dev/null +++ b/doc/source/api/nova..tests.real_flags.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.real_flags` Module +============================================================================== +.. automodule:: nova..tests.real_flags + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.rpc_unittest.rst b/doc/source/api/nova..tests.rpc_unittest.rst new file mode 100644 index 000000000000..e6c7ceb2e04a --- /dev/null +++ b/doc/source/api/nova..tests.rpc_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.rpc_unittest` Module +============================================================================== +.. automodule:: nova..tests.rpc_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.runtime_flags.rst b/doc/source/api/nova..tests.runtime_flags.rst new file mode 100644 index 000000000000..984e21199b4c --- /dev/null +++ b/doc/source/api/nova..tests.runtime_flags.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.runtime_flags` Module +============================================================================== +.. automodule:: nova..tests.runtime_flags + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.scheduler_unittest.rst b/doc/source/api/nova..tests.scheduler_unittest.rst new file mode 100644 index 000000000000..ae3a0661658d --- /dev/null +++ b/doc/source/api/nova..tests.scheduler_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.scheduler_unittest` Module +============================================================================== +.. automodule:: nova..tests.scheduler_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.service_unittest.rst b/doc/source/api/nova..tests.service_unittest.rst new file mode 100644 index 000000000000..c7c746d17e10 --- /dev/null +++ b/doc/source/api/nova..tests.service_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.service_unittest` Module +============================================================================== +.. automodule:: nova..tests.service_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.twistd_unittest.rst b/doc/source/api/nova..tests.twistd_unittest.rst new file mode 100644 index 000000000000..ce88202e102a --- /dev/null +++ b/doc/source/api/nova..tests.twistd_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.twistd_unittest` Module +============================================================================== +.. automodule:: nova..tests.twistd_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.validator_unittest.rst b/doc/source/api/nova..tests.validator_unittest.rst new file mode 100644 index 000000000000..980284327f89 --- /dev/null +++ b/doc/source/api/nova..tests.validator_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.validator_unittest` Module +============================================================================== +.. automodule:: nova..tests.validator_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.virt_unittest.rst b/doc/source/api/nova..tests.virt_unittest.rst new file mode 100644 index 000000000000..2189be41ef96 --- /dev/null +++ b/doc/source/api/nova..tests.virt_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.virt_unittest` Module +============================================================================== +.. automodule:: nova..tests.virt_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..tests.volume_unittest.rst b/doc/source/api/nova..tests.volume_unittest.rst new file mode 100644 index 000000000000..791e192f5339 --- /dev/null +++ b/doc/source/api/nova..tests.volume_unittest.rst @@ -0,0 +1,6 @@ +The :mod:`nova..tests.volume_unittest` Module +============================================================================== +.. automodule:: nova..tests.volume_unittest + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..twistd.rst b/doc/source/api/nova..twistd.rst new file mode 100644 index 000000000000..d4145396db02 --- /dev/null +++ b/doc/source/api/nova..twistd.rst @@ -0,0 +1,6 @@ +The :mod:`nova..twistd` Module +============================================================================== +.. automodule:: nova..twistd + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..utils.rst b/doc/source/api/nova..utils.rst new file mode 100644 index 000000000000..1131d1080942 --- /dev/null +++ b/doc/source/api/nova..utils.rst @@ -0,0 +1,6 @@ +The :mod:`nova..utils` Module +============================================================================== +.. automodule:: nova..utils + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..validate.rst b/doc/source/api/nova..validate.rst new file mode 100644 index 000000000000..1d142f103259 --- /dev/null +++ b/doc/source/api/nova..validate.rst @@ -0,0 +1,6 @@ +The :mod:`nova..validate` Module +============================================================================== +.. automodule:: nova..validate + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..virt.connection.rst b/doc/source/api/nova..virt.connection.rst new file mode 100644 index 000000000000..caf76676514e --- /dev/null +++ b/doc/source/api/nova..virt.connection.rst @@ -0,0 +1,6 @@ +The :mod:`nova..virt.connection` Module +============================================================================== +.. automodule:: nova..virt.connection + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..virt.fake.rst b/doc/source/api/nova..virt.fake.rst new file mode 100644 index 000000000000..06ecdbf7d688 --- /dev/null +++ b/doc/source/api/nova..virt.fake.rst @@ -0,0 +1,6 @@ +The :mod:`nova..virt.fake` Module +============================================================================== +.. automodule:: nova..virt.fake + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..virt.images.rst b/doc/source/api/nova..virt.images.rst new file mode 100644 index 000000000000..4fdeb7af8dc7 --- /dev/null +++ b/doc/source/api/nova..virt.images.rst @@ -0,0 +1,6 @@ +The :mod:`nova..virt.images` Module +============================================================================== +.. automodule:: nova..virt.images + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..virt.libvirt_conn.rst b/doc/source/api/nova..virt.libvirt_conn.rst new file mode 100644 index 000000000000..7fb8aed5fe89 --- /dev/null +++ b/doc/source/api/nova..virt.libvirt_conn.rst @@ -0,0 +1,6 @@ +The :mod:`nova..virt.libvirt_conn` Module +============================================================================== +.. automodule:: nova..virt.libvirt_conn + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..virt.xenapi.rst b/doc/source/api/nova..virt.xenapi.rst new file mode 100644 index 000000000000..2e396bf06ccf --- /dev/null +++ b/doc/source/api/nova..virt.xenapi.rst @@ -0,0 +1,6 @@ +The :mod:`nova..virt.xenapi` Module +============================================================================== +.. automodule:: nova..virt.xenapi + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..volume.driver.rst b/doc/source/api/nova..volume.driver.rst new file mode 100644 index 000000000000..51f5c07295c0 --- /dev/null +++ b/doc/source/api/nova..volume.driver.rst @@ -0,0 +1,6 @@ +The :mod:`nova..volume.driver` Module +============================================================================== +.. automodule:: nova..volume.driver + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..volume.manager.rst b/doc/source/api/nova..volume.manager.rst new file mode 100644 index 000000000000..91a192a8f5ef --- /dev/null +++ b/doc/source/api/nova..volume.manager.rst @@ -0,0 +1,6 @@ +The :mod:`nova..volume.manager` Module +============================================================================== +.. automodule:: nova..volume.manager + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/nova..wsgi.rst b/doc/source/api/nova..wsgi.rst new file mode 100644 index 000000000000..0bff1c332399 --- /dev/null +++ b/doc/source/api/nova..wsgi.rst @@ -0,0 +1,6 @@ +The :mod:`nova..wsgi` Module +============================================================================== +.. automodule:: nova..wsgi + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/code.rst b/doc/source/code.rst new file mode 100644 index 000000000000..6b8d5661f55f --- /dev/null +++ b/doc/source/code.rst @@ -0,0 +1,96 @@ +Generating source/api/nova..adminclient.rst +Generating source/api/nova..api.cloud.rst +Generating source/api/nova..api.ec2.admin.rst +Generating source/api/nova..api.ec2.apirequest.rst +Generating source/api/nova..api.ec2.cloud.rst +Generating source/api/nova..api.ec2.images.rst +Generating source/api/nova..api.ec2.metadatarequesthandler.rst +Generating source/api/nova..api.openstack.auth.rst +Generating source/api/nova..api.openstack.backup_schedules.rst +Generating source/api/nova..api.openstack.faults.rst +Generating source/api/nova..api.openstack.flavors.rst +Generating source/api/nova..api.openstack.images.rst +Generating source/api/nova..api.openstack.servers.rst +Generating source/api/nova..api.openstack.sharedipgroups.rst +Generating source/api/nova..auth.dbdriver.rst +Generating source/api/nova..auth.fakeldap.rst +Generating source/api/nova..auth.ldapdriver.rst +Generating source/api/nova..auth.manager.rst +Generating source/api/nova..auth.signer.rst +Generating source/api/nova..cloudpipe.pipelib.rst +Generating source/api/nova..compute.disk.rst +Generating source/api/nova..compute.instance_types.rst +Generating source/api/nova..compute.manager.rst +Generating source/api/nova..compute.monitor.rst +Generating source/api/nova..compute.power_state.rst +Generating source/api/nova..context.rst +Generating source/api/nova..crypto.rst +Generating source/api/nova..db.api.rst +Generating source/api/nova..db.sqlalchemy.api.rst +Generating source/api/nova..db.sqlalchemy.models.rst +Generating source/api/nova..db.sqlalchemy.session.rst +Generating source/api/nova..exception.rst +Generating source/api/nova..fakerabbit.rst +Generating source/api/nova..flags.rst +Generating source/api/nova..image.service.rst +Generating source/api/nova..manager.rst +Generating source/api/nova..network.linux_net.rst +Generating source/api/nova..network.manager.rst +Generating source/api/nova..objectstore.bucket.rst +Generating source/api/nova..objectstore.handler.rst +Generating source/api/nova..objectstore.image.rst +Generating source/api/nova..objectstore.stored.rst +Generating source/api/nova..process.rst +Generating source/api/nova..quota.rst +Generating source/api/nova..rpc.rst +Generating source/api/nova..scheduler.chance.rst +Generating source/api/nova..scheduler.driver.rst +Generating source/api/nova..scheduler.manager.rst +Generating source/api/nova..scheduler.simple.rst +Generating source/api/nova..server.rst +Generating source/api/nova..service.rst +Generating source/api/nova..test.rst +Generating source/api/nova..tests.access_unittest.rst +Generating source/api/nova..tests.api.fakes.rst +Generating source/api/nova..tests.api.openstack.fakes.rst +Generating source/api/nova..tests.api.openstack.test_api.rst +Generating source/api/nova..tests.api.openstack.test_auth.rst +Generating source/api/nova..tests.api.openstack.test_faults.rst +Generating source/api/nova..tests.api.openstack.test_flavors.rst +Generating source/api/nova..tests.api.openstack.test_images.rst +Generating source/api/nova..tests.api.openstack.test_ratelimiting.rst +Generating source/api/nova..tests.api.openstack.test_servers.rst +Generating source/api/nova..tests.api.openstack.test_sharedipgroups.rst +Generating source/api/nova..tests.api.test_wsgi.rst +Generating source/api/nova..tests.api_integration.rst +Generating source/api/nova..tests.api_unittest.rst +Generating source/api/nova..tests.auth_unittest.rst +Generating source/api/nova..tests.cloud_unittest.rst +Generating source/api/nova..tests.compute_unittest.rst +Generating source/api/nova..tests.declare_flags.rst +Generating source/api/nova..tests.fake_flags.rst +Generating source/api/nova..tests.flags_unittest.rst +Generating source/api/nova..tests.network_unittest.rst +Generating source/api/nova..tests.objectstore_unittest.rst +Generating source/api/nova..tests.process_unittest.rst +Generating source/api/nova..tests.quota_unittest.rst +Generating source/api/nova..tests.real_flags.rst +Generating source/api/nova..tests.rpc_unittest.rst +Generating source/api/nova..tests.runtime_flags.rst +Generating source/api/nova..tests.scheduler_unittest.rst +Generating source/api/nova..tests.service_unittest.rst +Generating source/api/nova..tests.twistd_unittest.rst +Generating source/api/nova..tests.validator_unittest.rst +Generating source/api/nova..tests.virt_unittest.rst +Generating source/api/nova..tests.volume_unittest.rst +Generating source/api/nova..twistd.rst +Generating source/api/nova..utils.rst +Generating source/api/nova..validate.rst +Generating source/api/nova..virt.connection.rst +Generating source/api/nova..virt.fake.rst +Generating source/api/nova..virt.images.rst +Generating source/api/nova..virt.libvirt_conn.rst +Generating source/api/nova..virt.xenapi.rst +Generating source/api/nova..volume.driver.rst +Generating source/api/nova..volume.manager.rst +Generating source/api/nova..wsgi.rst diff --git a/doc/source/conf.py b/doc/source/conf.py index 349bce02edeb..8f1b370ccbab 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -102,6 +102,15 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['nova.'] +# -- Options for man page output ----------------------------------------------- + +# Grouping the document tree for man pages. +# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' + +man_pages = [ + ('man/novamanage', 'novamanage', u'Cloud controller fabric', + [u'OpenStack'], 1) + ] # -- Options for HTML output --------------------------------------------------- diff --git a/doc/source/conf_back.py b/doc/source/conf_back.py new file mode 100644 index 000000000000..744f2f699263 --- /dev/null +++ b/doc/source/conf_back.py @@ -0,0 +1,226 @@ +# -*- coding: utf-8 -*- +# +# nova documentation build configuration file, created by +# sphinx-quickstart on Sat May 1 15:17:47 2010. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('../../')) +sys.path.insert(0, os.path.abspath('../')) +sys.path.insert(0, os.path.abspath('./')) + +# -- General configuration ----------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'ext.nova_todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig','sphinx.ext.graphviz'] + +# autodoc generation is a bit aggressive and a nuisance when doing heavy text edit cycles. +# execute "export SPHINX_DEBUG=1" in your terminal to disable +if not os.getenv('SPHINX_DEBUG'): + extensions += ['ext.nova_autodoc'] + +todo_include_todos = True + +# Add any paths that contain templates here, relative to this directory. +# Changing the path so that the Hudson build output contains GA code and the source +# docs do not contain the code so local, offline sphinx builds are "clean." +templates_path = [] +if os.getenv('HUDSON_PUBLISH_DOCS'): + templates_path = ['_ga', '_templates'] +else: + templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'nova' +copyright = u'2010, United States Government as represented by the Administrator of the National Aeronautics and Space Administration.' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '2010.1' +# The full version, including alpha/beta/rc tags. +release = '2010.1' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directory, that shouldn't be searched +# for source files. +exclude_trees = [] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +modindex_common_prefix = ['nova.'] + +# -- Options for man page output ----------------------------------------------- + +# Grouping the document tree for man pages. +# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' + +man_pages = [ + ('man/novamanage', 'nova-manage', u'Cloud controller fabric', + [u'OpenStack'], 1) + ] + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme_path = ["."] +html_theme = '_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_use_modindex = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'novadoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'Nova.tex', u'Nova Documentation', + u'Anso Labs, LLC', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_use_modindex = True + + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'python': ('http://docs.python.org/', None), + 'swift': ('http://swift.openstack.org', None)} + diff --git a/doc/source/devref/addmethod.openstackapi.rst b/doc/source/devref/addmethod.openstackapi.rst new file mode 100644 index 000000000000..6484613df2b0 --- /dev/null +++ b/doc/source/devref/addmethod.openstackapi.rst @@ -0,0 +1,56 @@ +.. + Copyright 2010 OpenStack LLC + All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + +Adding a Method to the OpenStack API +==================================== + +The interface is a mostly RESTful API. REST stands for Representational State Transfer and provides an architecture "style" for distributed systems using HTTP for transport. Figure out a way to express your request and response in terms of resources that are being created, modified, read, or destroyed. + +Routing +------- + +To map URLs to controllers+actions, OpenStack uses the Routes package, a clone of Rails routes for Python implementations. See http://routes.groovie.org/ fore more information. + +URLs are mapped to "action" methods on "controller" classes in nova/api/openstack/__init__/ApiRouter.__init__ . + +See http://routes.groovie.org/manual.html for all syntax, but you'll probably just need these two: + - mapper.connect() lets you map a single URL to a single action on a controller. + - mapper.resource() connects many standard URLs to actions on a controller. + +Controllers and actions +----------------------- + +Controllers live in nova/api/openstack, and inherit from nova.wsgi.Controller. + +See nova/api/openstack/servers.py for an example. + +Action methods take parameters that are sucked out of the URL by mapper.connect() or .resource(). The first two parameters are self and the WebOb request, from which you can get the req.environ, req.body, req.headers, etc. + +Serialization +------------- + +Actions return a dictionary, and wsgi.Controller serializes that to JSON or XML based on the request's content-type. + +If you define a new controller, you'll need to define a _serialization_metadata attribute on the class, to tell wsgi.Controller how to convert your dictionary to XML. It needs to know the singular form of any list tag (e.g. list contains tags) and which dictionary keys are to be XML attributes as opposed to subtags (e.g. instead of 4). + +See nova/api/openstack/servers.py for an example. + +Faults +------ + +If you need to return a non-200, you should +return faults.Fault(webob.exc.HTTPNotFound()) +replacing the exception as appropriate. diff --git a/doc/source/devref/development.environment.rst b/doc/source/devref/development.environment.rst index 34104c96420c..6344c5382ced 100644 --- a/doc/source/devref/development.environment.rst +++ b/doc/source/devref/development.environment.rst @@ -15,7 +15,83 @@ License for the specific language governing permissions and limitations under the License. -Setting up a development environment +Setting Up a Development Environment ==================================== -.. todo:: write this +This page describes how to setup a working Python development environment that can be used in developing on OpenStack on Ubuntu or Mac OSX. These instructions assume you're already familiar with bzr and can pull down the code with an existing Launchpad account. Refer to http://wiki.openstack.org/LifeWithBzrAndLaunchpad for additional information. + +Linux Systems +------------- + +Note: This section is tested for Nova on Ubuntu 10.10-64. Feel free to add notes and change according to your experiences or operating system. + +Bring down the Nova source with bzr, then: +:: + cd /nova + sudo apt-get install python-dev swig libssl-dev python-pip + sudo easy_install nose + pip install virtualenv + python tools/install_venv.py + +If all goes well, you should get a message something like this: +:: + Nova development environment setup is complete. + +Nova development uses virtualenv to track and manage Python dependencies while in development and testing. Virtual env gives you an independent Python environment. + +To activate the Nova virtualenv for the extent of your current shell session + you can run:: + + $ source .nova-venv/bin/activate + + Or, if you prefer, you can run commands in the virtualenv on a case by case + basis by running:: + + $ tools/with_venv.sh + + Also, make test will automatically use the virtualenv. + +If you don't want to create a virtualenv every time you branch (which takes a while as long as we have the large Twisted project as a dependency) you can reuse a single virtualenv for all branches. + + #. If you don't have a nova/ directory containing trunk/ and other branches, do so now. + #. Go into nova/trunk and install a virtualenv. + #. Move it up a level: mv nova/trunk/.nova-venv nova/.nova-venv. + #. Symlink the ../nova/.nova-venv directory from your branch:: + + ~/openstack/nova/my_branch$ ln -s ../.nova-venv .nova-venv + +This works with run_tests.sh and nosetests -w nova/tests/api + +MacOSX Systems +-------------- + +First, install Virtual Env, which creates an isolated "standalone" Python environment.:: + + sudo easy_install virtualenv + + +Here's how to setup the code initially:: + + bzr branch lp:nova + cd nova + python tools/install_venv.py + source .nova_venv/bin/activate + pip install pep8 # submitting patch so that Nova has pep8 and pylint in PIP requirements file + pip install pylint + +If you have installed OpenSSL 1.0.0a on MacOS, which can happen when installing a MacPorts package for OpenSSL, you will see an error when running nova.tests.auth_unittest.AuthTestCase.test_209_can_generate_x509. The version that functions correctly is OpenSSL 0.9.8l 5, installed with MacOS 10.6 as a base element. + +Here's how to get the latest code:: + + cd nova + bzr pull # get the latest stuff... + source .nova_venv/bin/activate + ./run_tests.sh + +And then you can do cleaning work or hack hack hack with a branched named cleaning:: + + bzr push lp:~launchpaduserid/nova/cleaning + +To submit the merge/patch that you hacked upon: + * Navigate to https://code.launchpad.net/~launchpaduserid/nova/cleaning. + * Click on the link "Propose for merging". diff --git a/doc/source/devref/index.rst b/doc/source/devref/index.rst index 6a93e3e188c8..589609aceb5f 100644 --- a/doc/source/devref/index.rst +++ b/doc/source/devref/index.rst @@ -23,8 +23,19 @@ In this section you will find information on Nova's lower level programming APIs Programming HowTos and Tutorials -------------------------------- +.. toctree:: + :maxdepth: 3 + + development.environment + addmethod.openstackapi -.. todo:: Add some programming howtos and tuts + +Programming Concepts +-------------------- +.. toctree:: + :maxdepth: 3 + + rabbit API Reference ------------- diff --git a/doc/source/devref/rabbit.rst b/doc/source/devref/rabbit.rst new file mode 100644 index 000000000000..423284a55c47 --- /dev/null +++ b/doc/source/devref/rabbit.rst @@ -0,0 +1,150 @@ +.. + Copyright (c) 2010 Citrix Systems, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + +RabbitMQ and Nova +================= + +RabbitMQ is the messaging component chosen by the OpenStack cloud. RabbitMQ sits between any two Nova components and allows them to communicate in a loosely coupled fashion. More precisely, Nova components (the compute fabric of OpenStack) use Remote Procedure Calls (RPC hereinafter) to communicate to one another; however such a paradigm is built atop the publish/subscribe paradigm so that the following benefits can be achieved: + + * Decoupling between client and servant (such as the client does not need to know where the servant's reference is). + * Full a-synchronism between client and servant (such as the client does not need the servant to run at the same time of the remote call). + * Random balancing of remote calls (such as if more servants are up and running, one-way calls are transparently dispatched to the first available servant). + +Nova (Austin release) uses both direct and topic-based exchanges. The architecture looks like the one depicted in the figure below: + +.. image:: /images/rabbit/arch.png + :width: 60% + +.. + +Nova implements RPC (both request+response, and one-way, respectively nicknamed 'rpc.call' and 'rpc.cast') over AMQP by providing an adapter class which take cares of marshalling and unmarshalling of messages into function calls. Each Nova service (for example Compute, Volume, etc.) create two queues at the initialization time, one which accepts messages with routing keys 'NODE-TYPE.NODE-ID' (for example compute.hostname) and another, which accepts messages with routing keys as generic 'NODE-TYPE' (for example compute). The former is used specifically when Nova-API needs to redirect commands to a specific node like 'euca-terminate instance'. In this case, only the compute node whose host's hypervisor is running the virtual machine can kill the instance. The API acts as a consumer when RPC calls are request/response, otherwise is acts as publisher only. + +Nova RPC Mappings +----------------- + +The figure below shows the internals of a RabbitMQ node when a single instance is deployed and shared in an OpenStack cloud. Every Nova component connects to the RabbitMQ instance and, depending on its personality (for example a compute node or a network node), may use the queue either as an Invoker (such as API or Scheduler) or a Worker (such as Compute, Volume or Network). Invokers and Workers do not actually exist in the Nova object model, but we are going to use them as an abstraction for sake of clarity. An Invoker is a component that sends messages in the queuing system via two operations: 1) rpc.call and ii) rpc.cast; a Worker is a component that receives messages from the queuing system and reply accordingly to rcp.call operations. + +Figure 2 shows the following internal elements: + + * Topic Publisher: a Topic Publisher comes to life when an rpc.call or an rpc.cast operation is executed; this object is instantiated and used to push a message to the queuing system. Every publisher connects always to the same topic-based exchange; its life-cycle is limited to the message delivery. + * Direct Consumer: a Direct Consumer comes to life if (an only if) a rpc.call operation is executed; this object is instantiated and used to receive a response message from the queuing system; Every consumer connects to a unique direct-based exchange via a unique exclusive queue; its life-cycle is limited to the message delivery; the exchange and queue identifiers are determined by a UUID generator, and are marshalled in the message sent by the Topic Publisher (only rpc.call operations). + * Topic Consumer: a Topic Consumer comes to life as soon as a Worker is instantiated and exists throughout its life-cycle; this object is used to receive messages from the queue and it invokes the appropriate action as defined by the Worker role. A Topic Consumer connects to the same topic-based exchange either via a shared queue or via a unique exclusive queue. Every Worker has two topic consumers, one that is addressed only during rpc.cast operations (and it connects to a shared queue whose exchange key is 'topic') and the other that is addressed only during rpc.call operations (and it connects to a unique queue whose exchange key is 'topic.host'). + * Direct Publisher: a Direct Publisher comes to life only during rpc.call operations and it is instantiated to return the message required by the request/response operation. The object connects to a direct-based exchange whose identity is dictated by the incoming message. + * Topic Exchange: The Exchange is a routing table that exists in the context of a virtual host (the multi-tenancy mechanism provided by RabbitMQ); its type (such as topic vs. direct) determines the routing policy; a RabbitMQ node will have only one topic-based exchange for every topic in Nova. + * Direct Exchange: this is a routing table that is created during rpc.call operations; there are many instances of this kind of exchange throughout the life-cycle of a RabbitMQ node, one for each rpc.call invoked. + * Queue Element: A Queue is a message bucket. Messages are kept in the queue until a Consumer (either Topic or Direct Consumer) connects to the queue and fetch it. Queues can be shared or can be exclusive. Queues whose routing key is 'topic' are shared amongst Workers of the same personality. + +.. image:: /images/rabbit/rabt.png + :width: 60% + +.. + +RPC Calls +--------- + +The diagram below shows the message flow during an rp.call operation: + + 1. a Topic Publisher is instantiated to send the message request to the queuing system; immediately before the publishing operation, a Direct Consumer is instantiated to wait for the response message. + 2. once the message is dispatched by the exchange, it is fetched by the Topic Consumer dictated by the routing key (such as 'topic.host') and passed to the Worker in charge of the task. + 3. once the task is completed, a Direct Publisher is allocated to send the response message to the queuing system. + 4. once the message is dispatched by the exchange, it is fetched by the Direct Consumer dictated by the routing key (such as 'msg_id') and passed to the Invoker. + +.. image:: /images/rabbit/flow1.png + :width: 60% + +.. + +RPC Casts +--------- + +The diagram below the message flow during an rp.cast operation: + + 1. a Topic Publisher is instantiated to send the message request to the queuing system. + 2. once the message is dispatched by the exchange, it is fetched by the Topic Consumer dictated by the routing key (such as 'topic') and passed to the Worker in charge of the task. + +.. image:: /images/rabbit/flow2.png + :width: 60% + +.. + +RabbitMQ Load +------------- + +At any given time the load of a RabbitMQ node is function of the following parameters: + + * Throughput of API calls: the number of API calls (more precisely rpc.call ops) being served by the OpenStack cloud dictates the number of direct-based exchanges, related queues and direct consumers connected to them. + * Number of Workers: there is one queue shared amongst workers with the same personality; however there are as many exclusive queues as the number of workers; the number of workers dictates also the number of routing keys within the topic-based exchange, which is shared amongst all workers. + +The figure below shows the status of the RabbitMQ node after Nova components' bootstrap in a test environment. Exchanges and queues being created by Nova components are: + + * Exchanges + 1. nova (topic exchange) + * Queues + 1. compute.phantom (phantom is hostname) + 2. compute + 3. network.phantom (phantom is hostname) + 4. network + 5. volume.phantom (phantom is hostname) + 6. volume + 7. scheduler.phantom (phantom is hostname) + 8. scheduler + +.. image:: /images/rabbit/state.png + :width: 60% + +.. + +RabbitMQ Gotchas +---------------- + +Nova uses Carrot to connect to the RabbitMQ environment. Carrot is a Python library that in turn uses AMQPLib, a library that implements the standard AMQP 0.8 at the time of writing. When using Carrot, Invokers and Workers need the following parameters in order to instantiate a Connection object that connects to the RabbitMQ server (please note that most of the following material can be also found in the Carrot documentation; it has been summarized and revised here for sake of clarity): + + * Hostname: The hostname to the AMQP server. + * Userid: A valid username used to authenticate to the server. + * Password: The password used to authenticate to the server. + * Virtual_host: The name of the virtual host to work with. This virtual host must exist on the server, and the user must have access to it. Default is "/". + * Port: The port of the AMQP server. Default is 5672 (amqp). + +The following parameters are default: + + * Insist: insist on connecting to a server. In a configuration with multiple load-sharing servers, the Insist option tells the server that the client is insisting on a connection to the specified server. Default is False. + * Connect_timeout: the timeout in seconds before the client gives up connecting to the server. The default is no timeout. + * SSL: use SSL to connect to the server. The default is False. + +More precisely Consumers need the following parameters: + + * Connection: the above mentioned Connection object. + * Queue: name of the queue. + * Exchange: name of the exchange the queue binds to. + * Routing_key: the interpretation of the routing key depends on the value of the exchange_type attribute. + + * Direct exchange: if the routing key property of the message and the routing_key attribute of the queue are identical, then the message is forwarded to the queue. + * Fanout exchange: messages are forwarded to the queues bound the exchange, even if the binding does not have a key. + * Topic exchange: if the routing key property of the message matches the routing key of the key according to a primitive pattern matching scheme, then the message is forwarded to the queue. The message routing key then consists of words separated by dots (".", like domain names), and two special characters are available; star ("") and hash ("#"). The star matches any word, and the hash matches zero or more words. For example ".stock.#" matches the routing keys "usd.stock" and "eur.stock.db" but not "stock.nasdaq". + + * Durable: this flag determines the durability of both exchanges and queues; durable exchanges and queues remain active when a RabbitMQ server restarts. Non-durable exchanges/queues (transient exchanges/queues) are purged when a server restarts. It is worth noting that AMQP specifies that durable queues cannot bind to transient exchanges. Default is True. + * Auto_delete: if set, the exchange is deleted when all queues have finished using it. Default is False. + * Exclusive: exclusive queues (such as non-shared) may only be consumed from by the current connection. When exclusive is on, this also implies auto_delete. Default is False. + * Exchange_type: AMQP defines several default exchange types (routing algorithms) that covers most of the common messaging use cases. + * Auto_ack: acknowledgement is handled automatically once messages are received. By default auto_ack is set to False, and the receiver is required to manually handle acknowledgment. + * No_ack: it disable acknowledgement on the server-side. This is different from auto_ack in that acknowledgement is turned off altogether. This functionality increases performance but at the cost of reliability. Messages can get lost if a client dies before it can deliver them to the application. + * Auto_declare: if this is True and the exchange name is set, the exchange will be automatically declared at instantiation. Auto declare is on by default. + Publishers specify most the parameters of Consumers (such as they do not specify a queue name), but they can also specify the following: + * Delivery_mode: the default delivery mode used for messages. The value is an integer. The following delivery modes are supported by RabbitMQ: + + * 1 or "transient": the message is transient. Which means it is stored in memory only, and is lost if the server dies or restarts. + * 2 or "persistent": the message is persistent. Which means the message is stored both in-memory, and on disk, and therefore preserved if the server dies or restarts. + +The default value is 2 (persistent). During a send operation, Publishers can override the delivery mode of messages so that, for example, transient messages can be sent over a durable queue. diff --git a/doc/source/images/NOVA_ARCH.png b/doc/source/images/NOVA_ARCH.png new file mode 100644 index 000000000000..617ec42110a0 Binary files /dev/null and b/doc/source/images/NOVA_ARCH.png differ diff --git a/doc/source/images/NOVA_ARCH.svg b/doc/source/images/NOVA_ARCH.svg new file mode 100644 index 000000000000..ae7733a0f417 --- /dev/null +++ b/doc/source/images/NOVA_ARCH.svg @@ -0,0 +1,5854 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + AMQP + Messaging(RabbitMQ) + + + + nova-api + (Public API server) + + + + nova-api + (Public API server) + + + + + + + + + + + Internet + + + + Cloud users + Using tools to managevirtual guests + + + + + + + + + + + + + + + Admin network + + + + Internet EndUsers + Using services providedby virtual guests + + + + + + + + + + + + Publicnetwork + + + + + + + + + Disk Images + for Virtual Guests + + + + + + + + + Virtual Guests + Runing in the cloud + + + + nova-compute + (uses libvirt or XenAPI to manage guests) + + + + User authorisation + (SQL, LDAP or fake LDAP using ReDIS) + + + + + + + + + + nova-network + manages cloud networks, vlans and bridges + + + + + + + nova-volume + disk images for v. guests(filesystem or AoE) + + + + + + + nova-objectstore + (implements S3-like apiUsing Files or (later) Swift + + + + + nova-scheduler + Plans where to place new guests + + + + + diff --git a/doc/source/images/NOVA_ARCH_200dpi.png b/doc/source/images/NOVA_ARCH_200dpi.png new file mode 100644 index 000000000000..9dde9aa92758 Binary files /dev/null and b/doc/source/images/NOVA_ARCH_200dpi.png differ diff --git a/doc/source/images/NOVA_ARCH_66dpi.png b/doc/source/images/NOVA_ARCH_66dpi.png new file mode 100644 index 000000000000..1ca7f3d3b1c0 Binary files /dev/null and b/doc/source/images/NOVA_ARCH_66dpi.png differ diff --git a/doc/source/images/NOVA_clouds_A_B.png b/doc/source/images/NOVA_clouds_A_B.png new file mode 100644 index 000000000000..439967cb1d34 Binary files /dev/null and b/doc/source/images/NOVA_clouds_A_B.png differ diff --git a/doc/source/images/NOVA_clouds_A_B.svg b/doc/source/images/NOVA_clouds_A_B.svg new file mode 100644 index 000000000000..221c984bdab4 --- /dev/null +++ b/doc/source/images/NOVA_clouds_A_B.svg @@ -0,0 +1,16342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + David Pravec <alekibango@danix.org> + + + + + released under terms of Apache License + + + + + + + + + + + + + + + + + + + + + + + + + A) Nova running on 1 Hardware node + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Internet + + B) Cloud of 2-4 servers in one clusterSelf-contained storage solutionTypical smallest private cloud + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/source/images/NOVA_clouds_C1_C2.svg b/doc/source/images/NOVA_clouds_C1_C2.svg new file mode 100644 index 000000000000..6c303d9e0202 --- /dev/null +++ b/doc/source/images/NOVA_clouds_C1_C2.svg @@ -0,0 +1,9763 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + David Pravec <alekibango@danix.org> + + + + + released under terms of Apache License + + + + + + + + + + C) More computers, but still only 1 cluster,not distributed geographically + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Internet + + HA Database + HA storage(SAN, SheepDog ?) + Diskless servers running virtual guests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FW/VPNgiving access tocloud administrators + PXEBoot server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Monitoring + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C2) using diskless nodes + t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Internet + + HA Database forOpenStack Compute + Servers running virtual guests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FW/VPNgiving access tocloud administrators + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Monitoring + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C1) Nodes with disks + TODO: image store ?multicluster... + + diff --git a/doc/source/images/NOVA_clouds_C1_C2.svg.png b/doc/source/images/NOVA_clouds_C1_C2.svg.png new file mode 100644 index 000000000000..f7526bd1f887 Binary files /dev/null and b/doc/source/images/NOVA_clouds_C1_C2.svg.png differ diff --git a/doc/source/images/Novadiagram.png b/doc/source/images/Novadiagram.png new file mode 100644 index 000000000000..731adab95d7a Binary files /dev/null and b/doc/source/images/Novadiagram.png differ diff --git a/doc/source/images/rabbit/arch.png b/doc/source/images/rabbit/arch.png new file mode 100644 index 000000000000..8f7d535b6785 Binary files /dev/null and b/doc/source/images/rabbit/arch.png differ diff --git a/doc/source/images/rabbit/arch.svg b/doc/source/images/rabbit/arch.svg new file mode 100644 index 000000000000..efed6e981400 --- /dev/null +++ b/doc/source/images/rabbit/arch.svg @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + Box.8 + Compute + + + + + + + Compute + + Box.2 + Volume Storage + + + + + + + VolumeStorage + + Box + Auth Manager + + + + + + + Auth Manager + + Box.4 + Cloud Controller + + + + + + + CloudController + + Box.3 + API Server + + + + + + + API Server + + Box.6 + Object Store + + + + + + + ObjectStore + + Box.7 + Node Controller + + + + + + + NodeController + + Dynamic connector + + + + Dynamic connector.11 + + + + Dynamic connector.12 + http + + + + + http + + Circle + Nova-Manage + + + + + + + Nova-Manage + + Circle.15 + Euca2ools + + + + + + + Euca2ools + + Dynamic connector.16 + + + + Dynamic connector.17 + + + + Sheet.15 + Project User Role Network VPN + + + + ProjectUserRoleNetworkVPN + + Sheet.16 + VM instance Security group Volume Snapshot VM image IP addres... + + + + VM instanceSecurity groupVolumeSnapshotVM imageIP addressSSH keyAvailability zone + + Box.20 + Network Controller + + + + + + + Network Controller + + Box.5 + Storage Controller + + + + + + + Storage Controller + + Dot & arrow + + + + + + + + + + + + + Dot & arrow.14 + + + + + + + + + + + + + Dynamic connector.13 + + + + Sheet.22 + AMQP + + + + AMQP + + Sheet.23 + AMQP + + + + AMQP + + Sheet.24 + AMQP + + + + AMQP + + Sheet.25 + REST + + + + REST + + Sheet.26 + local method + + + + local method + + Sheet.27 + local method + + + + local method + + Sheet.28 + local method + + + + local method + + diff --git a/doc/source/images/rabbit/flow1.png b/doc/source/images/rabbit/flow1.png new file mode 100644 index 000000000000..ea325ad0826e Binary files /dev/null and b/doc/source/images/rabbit/flow1.png differ diff --git a/doc/source/images/rabbit/flow1.svg b/doc/source/images/rabbit/flow1.svg new file mode 100644 index 000000000000..6d8f7e280061 --- /dev/null +++ b/doc/source/images/rabbit/flow1.svg @@ -0,0 +1,617 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + Rounded rectangle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ATM switch + name: control_exchange (type: topic) + + Sheet.3 + + + + Sheet.4 + + + + Sheet.5 + + + + Sheet.6 + + + + Sheet.7 + + + + Sheet.8 + + + + + + name: control_exchange(type: topic) + + + Sheet.9 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.17 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.25 + + + + Sheet.26 + key: topic + + + + key: topic + + Sheet.27 + key: topic.host + + + + key: topic.host + + Sheet.28 + + + + Rectangle + Topic Consumer + + + + + + + Topic Consumer + + Rectangle.30 + Topic Consumer + + + + + + + Topic Consumer + + Sheet.31 + + + + Sheet.32 + + + + Sheet.33 + + + + Rectangle.34 + + + + + + + Rectangle.35 + Direct Publisher + + + + + + + DirectPublisher + + Sheet.36 + Worker (e.g. compute) + + + + Worker(e.g. compute) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ATM switch.37 + name: msg_id (type: direct) + + Sheet.38 + + + + Sheet.39 + + + + Sheet.40 + + + + Sheet.41 + + + + Sheet.42 + + + + Sheet.43 + + + + + + name: msg_id(type: direct) + + + Sheet.44 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.52 + key: msg_id + + + + key: msg_id + + Sheet.53 + + + + Sheet.54 + + + + Rectangle.57 + + + + + + + Rectangle.56 + Direct Consumer + + + + + + + DirectConsumer + + Sheet.57 + Invoker (e.g. api) + + + + Invoker(e.g. api) + + Rectangle.55 + Topic Publisher + + + + + + + Topic Publisher + + Sheet.59 + + + + Sheet.60 + + + + Sheet.61 + RabbitMQ Node + + + + RabbitMQ Node + + Sheet.62 + + + + Sheet.64 + rpc.call (topic.host) + + + + rpc.call(topic.host) + + Sheet.63 + + + + Sheet.66 + + + + Sheet.67 + + + + Sheet.68 + + + + diff --git a/doc/source/images/rabbit/flow2.png b/doc/source/images/rabbit/flow2.png new file mode 100644 index 000000000000..19de2aafd66a Binary files /dev/null and b/doc/source/images/rabbit/flow2.png differ diff --git a/doc/source/images/rabbit/flow2.svg b/doc/source/images/rabbit/flow2.svg new file mode 100644 index 000000000000..fe4cdf341ba5 --- /dev/null +++ b/doc/source/images/rabbit/flow2.svg @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + Rounded rectangle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ATM switch + name: control_exchange (type: topic) + + Sheet.3 + + + + Sheet.4 + + + + Sheet.5 + + + + Sheet.6 + + + + Sheet.7 + + + + Sheet.8 + + + + + + name: control_exchange(type: topic) + + + Sheet.9 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.17 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.25 + + + + Sheet.26 + key: topic + + + + key: topic + + Sheet.27 + key: topic.host + + + + key: topic.host + + Sheet.28 + + + + Rectangle + Topic Consumer + + + + + + + Topic Consumer + + Rectangle.30 + Topic Consumer + + + + + + + Topic Consumer + + Sheet.31 + + + + Sheet.32 + + + + Sheet.33 + + + + Rectangle.34 + + + + + + + Sheet.36 + Worker (e.g. compute) + + + + Worker(e.g. compute) + + Rectangle.57 + + + + + + + Sheet.57 + Invoker (e.g. api) + + + + Invoker(e.g. api) + + Rectangle.55 + Topic Publisher + + + + + + + Topic Publisher + + Sheet.59 + + + + Sheet.61 + RabbitMQ Node + + + + RabbitMQ Node + + Sheet.62 + + + + Sheet.63 + rpc.cast(topic) + + + + rpc.cast(topic) + + Sheet.64 + + + + Sheet.65 + + + + diff --git a/doc/source/images/rabbit/rabt.png b/doc/source/images/rabbit/rabt.png new file mode 100644 index 000000000000..e3923b9a7d0d Binary files /dev/null and b/doc/source/images/rabbit/rabt.png differ diff --git a/doc/source/images/rabbit/rabt.svg b/doc/source/images/rabbit/rabt.svg new file mode 100644 index 000000000000..142a33ce0654 --- /dev/null +++ b/doc/source/images/rabbit/rabt.svg @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + Rounded rectangle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ATM switch + name: control_exchange (type: topic) + + Sheet.3 + + + + Sheet.4 + + + + Sheet.5 + + + + Sheet.6 + + + + Sheet.7 + + + + Sheet.8 + + + + + + name: control_exchange(type: topic) + + + Sheet.17 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.9 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.25 + + + + Sheet.27 + key: topic + + + + key: topic + + Sheet.28 + key: topic.host + + + + key: topic.host + + Sheet.26 + + + + Rectangle + Topic Consumer + + + + + + + Topic Consumer + + Rectangle.30 + Topic Consumer + + + + + + + Topic Consumer + + Sheet.31 + + + + Sheet.32 + + + + Sheet.33 + + + + Rectangle.34 + + + + + + + Rectangle.35 + Direct Publisher + + + + + + + DirectPublisher + + Sheet.36 + Worker (e.g. compute) + + + + Worker(e.g. compute) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ATM switch.37 + name: msg_id (type: direct) + + Sheet.38 + + + + Sheet.39 + + + + Sheet.40 + + + + Sheet.41 + + + + Sheet.42 + + + + Sheet.43 + + + + + + name: msg_id(type: direct) + + + Sheet.44 + + Rectangle + + + + + + + Rectangle.10 + + + + + + + Rectangle.11 + + + + + + + Rectangle.12 + + + + + + + Rectangle.13 + + + + + + + Rectangle.14 + + + + + + + Rectangle.15 + + + + + + + + Sheet.52 + key: msg_id + + + + key: msg_id + + Sheet.53 + + + + Sheet.54 + + + + Rectangle.57 + + + + + + + Rectangle.58 + Direct Consumer + + + + + + + DirectConsumer + + Sheet.59 + Invoker (e.g. api) + + + + Invoker(e.g. api) + + Rectangle.55 + Topic Publisher + + + + + + + Topic Publisher + + Sheet.56 + + + + Sheet.60 + + + + Sheet.62 + RabbitMQ Node (single virtual host context) + + + + RabbitMQ Node(single virtual host context) + + diff --git a/doc/source/images/rabbit/state.png b/doc/source/images/rabbit/state.png new file mode 100644 index 000000000000..76ce675a9f70 Binary files /dev/null and b/doc/source/images/rabbit/state.png differ diff --git a/doc/source/man/novamanage.rst b/doc/source/man/novamanage.rst new file mode 100644 index 000000000000..0cb6c7c902cf --- /dev/null +++ b/doc/source/man/novamanage.rst @@ -0,0 +1,189 @@ +=========== +nova-manage +=========== + +------------------------------------------------------ +control and manage cloud computer instances and images +------------------------------------------------------ + +:Author: nova@lists.launchpad.net +:Date: 2010-11-16 +:Copyright: OpenStack LLC +:Version: 0.1 +:Manual section: 1 +:Manual group: cloud computing + +SYNOPSIS +======== + + nova-manage [] + +DESCRIPTION +=========== + +nova-manage controls cloud computing instances by managing nova users, nova projects, nova roles, shell selection, vpn connections, and floating IP address configuration. More information about OpenStack Nova is at http://nova.openstack.org. + +OPTIONS +======= + +The standard pattern for executing a nova-manage command is: +``nova-manage []`` + +For example, to obtain a list of all projects: +``nova-manage project list`` + +Run without arguments to see a list of available command categories: +``nova-manage`` + +Categories are user, project, role, shell, vpn, and floating. Detailed descriptions are below. + +You can also run with a category argument such as user to see a list of all commands in that category: +``nova-manage user`` + +These sections describe the available categories and arguments for nova-manage. + +Nova User +~~~~~~~~~ + +``nova-manage user admin `` + + Create an admin user with the name . + +``nova-manage user create `` + + Create a normal user with the name . + +``nova-manage user delete `` + + Delete the user with the name . + +``nova-manage user exports `` + + Outputs a list of access key and secret keys for user to the screen + +``nova-manage user list`` + + Outputs a list of all the user names to the screen. + +``nova-manage user modify `` + + Updates the indicated user keys, indicating with T or F if the user is an admin user. Leave any argument blank if you do not want to update it. + +Nova Project +~~~~~~~~~~~~ + +``nova-manage project add `` + + Add a nova project with the name to the database. + +``nova-manage project create `` + + Create a new nova project with the name (you still need to do nova-manage project add to add it to the database). + +``nova-manage project delete `` + + Delete a nova project with the name . + +``nova-manage project environment `` + + Exports environment variables for the named project to a file named novarc. + +``nova-manage project list`` + + Outputs a list of all the projects to the screen. + +``nova-manage project quota `` + + Outputs the size and specs of the project's instances including gigabytes, instances, floating IPs, volumes, and cores. + +``nova-manage project remove `` + + Deletes the project with the name . + +``nova-manage project zipfile`` + + Compresses all related files for a created project into a zip file nova.zip. + +Nova Role +~~~~~~~~~ + +nova-manage role [] +``nova-manage role add <(optional) projectname>`` + + Add a user to either a global or project-based role with the indicated assigned to the named user. Role names can be one of the following five roles: admin, itsec, projectmanager, netadmin, developer. If you add the project name as the last argument then the role is assigned just for that project, otherwise the user is assigned the named role for all projects. + +``nova-manage role has `` + Checks the user or project and responds with True if the user has a global role with a particular project. + +``nova-manage role remove `` + Remove the indicated role from the user. + +Nova Shell +~~~~~~~~~~ + +``nova-manage shell bpython`` + + Starts a new bpython shell. + +``nova-manage shell ipython`` + + Starts a new ipython shell. + +``nova-manage shell python`` + + Starts a new python shell. + +``nova-manage shell run`` + + Starts a new shell using python. + +``nova-manage shell script `` + + Runs the named script from the specified path with flags set. + +Nova VPN +~~~~~~~~ + +``nova-manage vpn list`` + + Displays a list of projects, their IP prot numbers, and what state they're in. + +``nova-manage vpn run `` + + Starts the VPN for the named project. + +``nova-manage vpn spawn`` + + Runs all VPNs. + +Nova Floating IPs +~~~~~~~~~~~~~~~~~ + +``nova-manage floating create `` + + Creates floating IP addresses for the named host by the given range. + floating delete Deletes floating IP addresses in the range given. + +``nova-manage floating list`` + + Displays a list of all floating IP addresses. + + +FILES +======== + +The nova-manage.conf file contains configuration information in the form of python-gflags. + +SEE ALSO +======== + +* `OpenStack Nova `__ +* `OpenStack Swift `__ + +BUGS +==== + +* Nova is sourced in Launchpad so you can view current bugs at `OpenStack Nova `__ + + + diff --git a/nova/adminclient.py b/nova/adminclient.py index af55197fc198..5a62cce7d209 100644 --- a/nova/adminclient.py +++ b/nova/adminclient.py @@ -22,13 +22,15 @@ Nova User API client library. import base64 import boto import httplib + +from nova import flags from boto.ec2.regioninfo import RegionInfo +FLAGS = flags.FLAGS + DEFAULT_CLC_URL = 'http://127.0.0.1:8773' DEFAULT_REGION = 'nova' -DEFAULT_ACCESS_KEY = 'admin' -DEFAULT_SECRET_KEY = 'admin' class UserInfo(object): @@ -192,9 +194,13 @@ class HostInfo(object): class NovaAdminClient(object): - def __init__(self, clc_url=DEFAULT_CLC_URL, region=DEFAULT_REGION, - access_key=DEFAULT_ACCESS_KEY, secret_key=DEFAULT_SECRET_KEY, - **kwargs): + def __init__( + self, + clc_url=DEFAULT_CLC_URL, + region=DEFAULT_REGION, + access_key=FLAGS.aws_access_key_id, + secret_key=FLAGS.aws_secret_access_key, + **kwargs): parts = self.split_clc_url(clc_url) self.clc_url = clc_url diff --git a/nova/api/__init__.py b/nova/api/__init__.py index 7e75445a8831..80f9f210927d 100644 --- a/nova/api/__init__.py +++ b/nova/api/__init__.py @@ -22,7 +22,6 @@ Root WSGI middleware for all API controllers. :osapi_subdomain: subdomain running the OpenStack API (default: api) :ec2api_subdomain: subdomain running the EC2 API (default: ec2) -:FAKE_subdomain: set to 'api' or 'ec2', requests default to that endpoint """ diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index b7664ec71da4..a6ee16c332a2 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -244,8 +244,8 @@ class Executor(wsgi.Application): resp = webob.Response() resp.status = 400 resp.headers['Content-Type'] = 'text/xml' - resp.body = ('\n' + resp.body = str('\n' '%s' '%s' - '?') % (code, message) + '?' % (code, message)) return resp diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index e2eaa7c5c3d6..9327bf0d44d5 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -41,7 +41,7 @@ from nova import rpc from nova import utils from nova.compute.instance_types import INSTANCE_TYPES from nova.api import cloud -from nova.api.ec2 import images +from nova.image.s3 import S3ImageService FLAGS = flags.FLAGS @@ -100,6 +100,7 @@ class CloudController(object): def __init__(self): self.network_manager = utils.import_object(FLAGS.network_manager) self.compute_manager = utils.import_object(FLAGS.compute_manager) + self.image_service = S3ImageService() self.setup() def __str__(self): @@ -785,7 +786,7 @@ class CloudController(object): vpn = kwargs['image_id'] == FLAGS.vpn_image_id if not vpn: - image = images.get(context, kwargs['image_id']) + image = self.image_service.show(context, kwargs['image_id']) # FIXME(ja): if image is vpn, this breaks # get defaults from imagestore @@ -798,8 +799,8 @@ class CloudController(object): ramdisk_id = kwargs.get('ramdisk_id', ramdisk_id) # make sure we have access to kernel and ramdisk - images.get(context, kernel_id) - images.get(context, ramdisk_id) + self.image_service.show(context, kernel_id) + self.image_service.show(context, ramdisk_id) logging.debug("Going to run %s instances...", num_instances) launch_time = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()) @@ -993,20 +994,17 @@ class CloudController(object): return True def describe_images(self, context, image_id=None, **kwargs): - # The objectstore does its own authorization for describe - imageSet = images.list(context, image_id) + imageSet = self.image_service.index(context, image_id) return {'imagesSet': imageSet} def deregister_image(self, context, image_id, **kwargs): - # FIXME: should the objectstore be doing these authorization checks? - images.deregister(context, image_id) + self.image_service.deregister(context, image_id) return {'imageId': image_id} def register_image(self, context, image_location=None, **kwargs): - # FIXME: should the objectstore be doing these authorization checks? if image_location is None and 'name' in kwargs: image_location = kwargs['name'] - image_id = images.register(context, image_location) + image_id = self.image_service.register(context, image_location) logging.debug("Registered %s as %s" % (image_location, image_id)) return {'imageId': image_id} @@ -1014,7 +1012,7 @@ class CloudController(object): if attribute != 'launchPermission': raise exception.ApiError('attribute not supported: %s' % attribute) try: - image = images.list(context, image_id)[0] + image = self.image_service.show(context, image_id) except IndexError: raise exception.ApiError('invalid id: %s' % image_id) result = {'image_id': image_id, 'launchPermission': []} @@ -1033,8 +1031,8 @@ class CloudController(object): raise exception.ApiError('only group "all" is supported') if not operation_type in ['add', 'remove']: raise exception.ApiError('operation_type must be add or remove') - return images.modify(context, image_id, operation_type) + return self.image_service.modify(context, image_id, operation_type) def update_image(self, context, image_id, **kwargs): - result = images.update(context, image_id, dict(kwargs)) + result = self.image_service.update(context, image_id, dict(kwargs)) return result diff --git a/nova/api/ec2/images.py b/nova/api/ec2/images.py deleted file mode 100644 index 60f9008e9495..000000000000 --- a/nova/api/ec2/images.py +++ /dev/null @@ -1,123 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -""" -Proxy AMI-related calls from the cloud controller, to the running -objectstore service. -""" - -import json -import urllib - -import boto.s3.connection - -from nova import exception -from nova import flags -from nova import utils -from nova.auth import manager - - -FLAGS = flags.FLAGS - - -def modify(context, image_id, operation): - conn(context).make_request( - method='POST', - bucket='_images', - query_args=qs({'image_id': image_id, 'operation': operation})) - - return True - - -def update(context, image_id, attributes): - """update an image's attributes / info.json""" - attributes.update({"image_id": image_id}) - conn(context).make_request( - method='POST', - bucket='_images', - query_args=qs(attributes)) - return True - - -def register(context, image_location): - """ rpc call to register a new image based from a manifest """ - - image_id = utils.generate_uid('ami') - conn(context).make_request( - method='PUT', - bucket='_images', - query_args=qs({'image_location': image_location, - 'image_id': image_id})) - - return image_id - - -def list(context, filter_list=[]): - """ return a list of all images that a user can see - - optionally filtered by a list of image_id """ - - if FLAGS.connection_type == 'fake': - return [{'imageId': 'bar'}] - - # FIXME: send along the list of only_images to check for - response = conn(context).make_request( - method='GET', - bucket='_images') - - result = json.loads(response.read()) - if not filter_list is None: - return [i for i in result if i['imageId'] in filter_list] - return result - - -def get(context, image_id): - """return a image object if the context has permissions""" - result = list(context, [image_id]) - if not result: - raise exception.NotFound('Image %s could not be found' % image_id) - image = result[0] - return image - - -def deregister(context, image_id): - """ unregister an image """ - conn(context).make_request( - method='DELETE', - bucket='_images', - query_args=qs({'image_id': image_id})) - - -def conn(context): - access = manager.AuthManager().get_access_key(context.user, - context.project) - secret = str(context.user.secret) - calling = boto.s3.connection.OrdinaryCallingFormat() - return boto.s3.connection.S3Connection(aws_access_key_id=access, - aws_secret_access_key=secret, - is_secure=False, - calling_format=calling, - port=FLAGS.s3_port, - host=FLAGS.s3_host) - - -def qs(params): - pairs = [] - for key in params.keys(): - pairs.append(key + '=' + urllib.quote(params[key])) - return '&'.join(pairs) diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py index 5bc915e633fe..cdbdc9bdd84e 100644 --- a/nova/api/openstack/images.py +++ b/nova/api/openstack/images.py @@ -17,6 +17,7 @@ from webob import exc +from nova import context from nova import flags from nova import utils from nova import wsgi @@ -46,19 +47,23 @@ class Controller(wsgi.Controller): def detail(self, req): """Return all public images in detail.""" + user_id = req.environ['nova.context']['user']['id'] + ctxt = context.RequestContext(user_id, user_id) try: - images = self._service.detail() + images = self._service.detail(ctxt) images = nova.api.openstack.limited(images, req) except NotImplementedError: # Emulate detail() using repeated calls to show() - images = self._service.index() + images = self._service.index(ctxt) images = nova.api.openstack.limited(images, req) - images = [self._service.show(i['id']) for i in images] + images = [self._service.show(ctxt, i['id']) for i in images] return dict(images=images) def show(self, req, id): """Return data about the given image id.""" - return dict(image=self._service.show(id)) + user_id = req.environ['nova.context']['user']['id'] + ctxt = context.RequestContext(user_id, user_id) + return dict(image=self._service.show(ctxt, id)) def delete(self, req, id): # Only public images are supported for now. diff --git a/nova/compute/monitor.py b/nova/compute/monitor.py index d0154600f368..ce45b14f622f 100644 --- a/nova/compute/monitor.py +++ b/nova/compute/monitor.py @@ -211,8 +211,8 @@ def store_graph(instance_id, filename): # the response we can make our own client that does the actual # request and hands it off to the response parser. s3 = boto.s3.connection.S3Connection( - aws_access_key_id='admin', - aws_secret_access_key='admin', + aws_access_key_id=FLAGS.aws_access_key_id, + aws_secret_access_key=FLAGS.aws_secret_access_key, is_secure=False, calling_format=boto.s3.connection.OrdinaryCallingFormat(), port=FLAGS.s3_port, diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index dfa4efc8f07f..afa55fc03a11 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -44,7 +44,6 @@ def is_admin_context(context): warnings.warn('Use of empty request context is deprecated', DeprecationWarning) raise Exception('die') - return True return context.is_admin @@ -502,14 +501,14 @@ def fixed_ip_get_by_address(context, address, session=None): @require_context def fixed_ip_get_instance(context, address): - fixed_ip_ref = fixed_ip_get_by_address(context, address) - return fixed_ip_ref.instance + fixed_ip_ref = fixed_ip_get_by_address(context, address) + return fixed_ip_ref.instance @require_admin_context def fixed_ip_get_network(context, address): - fixed_ip_ref = fixed_ip_get_by_address(context, address) - return fixed_ip_ref.network + fixed_ip_ref = fixed_ip_get_by_address(context, address) + return fixed_ip_ref.network @require_context diff --git a/nova/flags.py b/nova/flags.py index 4ae86d9b2c41..f7ae260503c6 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -179,6 +179,8 @@ DEFINE_list('region_list', [], 'list of region=url pairs separated by commas') DEFINE_string('connection_type', 'libvirt', 'libvirt, xenapi or fake') +DEFINE_string('aws_access_key_id', 'admin', 'AWS Access ID') +DEFINE_string('aws_secret_access_key', 'admin', 'AWS Access Key') DEFINE_integer('s3_port', 3333, 's3 port') DEFINE_string('s3_host', '127.0.0.1', 's3 host') DEFINE_string('compute_topic', 'compute', 'the topic compute nodes listen on') @@ -196,6 +198,8 @@ DEFINE_integer('rabbit_port', 5672, 'rabbit port') DEFINE_string('rabbit_userid', 'guest', 'rabbit userid') DEFINE_string('rabbit_password', 'guest', 'rabbit password') DEFINE_string('rabbit_virtual_host', '/', 'rabbit virtual host') +DEFINE_integer('rabbit_retry_interval', 10, 'rabbit connection retry interval') +DEFINE_integer('rabbit_max_retries', 12, 'rabbit connection attempts') DEFINE_string('control_exchange', 'nova', 'the main exchange to connect to') DEFINE_string('cc_host', '127.0.0.1', 'ip of api server') DEFINE_integer('cc_port', 8773, 'cloud controller port') @@ -232,7 +236,7 @@ DEFINE_string('scheduler_manager', 'nova.scheduler.manager.SchedulerManager', 'Manager for scheduler') # The service to use for image search and retrieval -DEFINE_string('image_service', 'nova.image.service.LocalImageService', +DEFINE_string('image_service', 'nova.image.local.LocalImageService', 'The service to use for retrieving and searching for images.') DEFINE_string('host', socket.gethostname(), diff --git a/nova/image/services/glance/__init__.py b/nova/image/glance.py similarity index 89% rename from nova/image/services/glance/__init__.py rename to nova/image/glance.py index f1d05f0bc79f..1ca6cf2eb7eb 100644 --- a/nova/image/services/glance/__init__.py +++ b/nova/image/glance.py @@ -19,6 +19,7 @@ import httplib import json +import logging import urlparse import webob.exc @@ -31,6 +32,17 @@ import nova.image.service FLAGS = flags.FLAGS +flags.DEFINE_string('glance_teller_address', 'http://127.0.0.1', + 'IP address or URL where Glance\'s Teller service resides') +flags.DEFINE_string('glance_teller_port', '9191', + 'Port for Glance\'s Teller service') +flags.DEFINE_string('glance_parallax_address', 'http://127.0.0.1', + 'IP address or URL where Glance\'s Parallax service ' + 'resides') +flags.DEFINE_string('glance_parallax_port', '9292', + 'Port for Glance\'s Parallax service') + + class TellerClient(object): def __init__(self): @@ -160,21 +172,21 @@ class GlanceImageService(nova.image.service.BaseImageService): self.teller = TellerClient() self.parallax = ParallaxClient() - def index(self): + def index(self, context): """ Calls out to Parallax for a list of images available """ images = self.parallax.get_image_index() return images - def detail(self): + def detail(self, context): """ Calls out to Parallax for a list of detailed image information """ images = self.parallax.get_image_details() return images - def show(self, id): + def show(self, context, id): """ Returns a dict containing image data for the given opaque image id. """ @@ -183,7 +195,7 @@ class GlanceImageService(nova.image.service.BaseImageService): return image raise exception.NotFound - def create(self, data): + def create(self, context, data): """ Store the image data and return the new image id. @@ -192,7 +204,7 @@ class GlanceImageService(nova.image.service.BaseImageService): """ return self.parallax.add_image_metadata(data) - def update(self, image_id, data): + def update(self, context, image_id, data): """Replace the contents of the given image with the new data. :raises NotFound if the image does not exist. @@ -200,7 +212,7 @@ class GlanceImageService(nova.image.service.BaseImageService): """ self.parallax.update_image_metadata(image_id, data) - def delete(self, image_id): + def delete(self, context, image_id): """ Delete the given image. diff --git a/nova/image/local.py b/nova/image/local.py new file mode 100644 index 000000000000..9b0cdcc50dd5 --- /dev/null +++ b/nova/image/local.py @@ -0,0 +1,88 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 OpenStack LLC. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import cPickle as pickle +import os.path +import random + +from nova import exception +from nova.image import service + + +class LocalImageService(service.BaseImageService): + + """Image service storing images to local disk. + + It assumes that image_ids are integers.""" + + def __init__(self): + self._path = "/tmp/nova/images" + try: + os.makedirs(self._path) + except OSError: # Exists + pass + + def _path_to(self, image_id): + return os.path.join(self._path, str(image_id)) + + def _ids(self): + """The list of all image ids.""" + return [int(i) for i in os.listdir(self._path)] + + def index(self, context): + return [dict(id=i['id'], name=i['name']) for i in self.detail(context)] + + def detail(self, context): + return [self.show(context, id) for id in self._ids()] + + def show(self, context, id): + try: + return pickle.load(open(self._path_to(id))) + except IOError: + raise exception.NotFound + + def create(self, context, data): + """ + Store the image data and return the new image id. + """ + id = random.randint(0, 2 ** 32 - 1) + data['id'] = id + self.update(context, id, data) + return id + + def update(self, context, image_id, data): + """Replace the contents of the given image with the new data.""" + try: + pickle.dump(data, open(self._path_to(image_id), 'w')) + except IOError: + raise exception.NotFound + + def delete(self, context, image_id): + """ + Delete the given image. Raises OSError if the image does not exist. + """ + try: + os.unlink(self._path_to(image_id)) + except IOError: + raise exception.NotFound + + def delete_all(self): + """ + Clears out all images in local directory + """ + for id in self._ids(): + os.unlink(self._path_to(id)) diff --git a/nova/image/s3.py b/nova/image/s3.py new file mode 100644 index 000000000000..0a25161de4c0 --- /dev/null +++ b/nova/image/s3.py @@ -0,0 +1,109 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +""" +Proxy AMI-related calls from the cloud controller, to the running +objectstore service. +""" + +import json +import urllib + +import boto.s3.connection + +from nova import exception +from nova import flags +from nova import utils +from nova.auth import manager +from nova.image import service + + +FLAGS = flags.FLAGS + + +class S3ImageService(service.BaseImageService): + + def modify(self, context, image_id, operation): + self._conn(context).make_request( + method='POST', + bucket='_images', + query_args=self._qs({'image_id': image_id, + 'operation': operation})) + return True + + def update(self, context, image_id, attributes): + """update an image's attributes / info.json""" + attributes.update({"image_id": image_id}) + self._conn(context).make_request( + method='POST', + bucket='_images', + query_args=self._qs(attributes)) + return True + + def register(self, context, image_location): + """ rpc call to register a new image based from a manifest """ + image_id = utils.generate_uid('ami') + self._conn(context).make_request( + method='PUT', + bucket='_images', + query_args=self._qs({'image_location': image_location, + 'image_id': image_id})) + return image_id + + def index(self, context): + """Return a list of all images that a user can see.""" + response = self._conn(context).make_request( + method='GET', + bucket='_images') + return json.loads(response.read()) + + def show(self, context, image_id): + """return a image object if the context has permissions""" + if FLAGS.connection_type == 'fake': + return {'imageId': 'bar'} + result = self.index(context) + result = [i for i in result if i['imageId'] == image_id] + if not result: + raise exception.NotFound('Image %s could not be found' % image_id) + image = result[0] + return image + + def deregister(self, context, image_id): + """ unregister an image """ + self._conn(context).make_request( + method='DELETE', + bucket='_images', + query_args=self._qs({'image_id': image_id})) + + def _conn(self, context): + access = manager.AuthManager().get_access_key(context.user, + context.project) + secret = str(context.user.secret) + calling = boto.s3.connection.OrdinaryCallingFormat() + return boto.s3.connection.S3Connection(aws_access_key_id=access, + aws_secret_access_key=secret, + is_secure=False, + calling_format=calling, + port=FLAGS.s3_port, + host=FLAGS.s3_host) + + def _qs(self, params): + pairs = [] + for key in params.keys(): + pairs.append(key + '=' + urllib.quote(params[key])) + return '&'.join(pairs) diff --git a/nova/image/service.py b/nova/image/service.py index 52ddd4e0f9de..ebee2228d58c 100644 --- a/nova/image/service.py +++ b/nova/image/service.py @@ -15,32 +15,12 @@ # License for the specific language governing permissions and limitations # under the License. -import cPickle as pickle -import os.path -import random - -from nova import flags -from nova import exception - -FLAGS = flags.FLAGS - - -flags.DEFINE_string('glance_teller_address', 'http://127.0.0.1', - 'IP address or URL where Glance\'s Teller service resides') -flags.DEFINE_string('glance_teller_port', '9191', - 'Port for Glance\'s Teller service') -flags.DEFINE_string('glance_parallax_address', 'http://127.0.0.1', - 'IP address or URL where Glance\'s Parallax service ' - 'resides') -flags.DEFINE_string('glance_parallax_port', '9292', - 'Port for Glance\'s Parallax service') - class BaseImageService(object): """Base class for providing image search and retrieval services""" - def index(self): + def index(self, context): """ Returns a sequence of mappings of id and name information about images. @@ -52,7 +32,7 @@ class BaseImageService(object): """ raise NotImplementedError - def detail(self): + def detail(self, context): """ Returns a sequence of mappings of detailed information about images. @@ -76,7 +56,7 @@ class BaseImageService(object): """ raise NotImplementedError - def show(self, id): + def show(self, context, id): """ Returns a dict containing image data for the given opaque image id. @@ -96,7 +76,7 @@ class BaseImageService(object): """ raise NotImplementedError - def create(self, data): + def create(self, context, data): """ Store the image data and return the new image id. @@ -105,7 +85,7 @@ class BaseImageService(object): """ raise NotImplementedError - def update(self, image_id, data): + def update(self, context, image_id, data): """Replace the contents of the given image with the new data. :raises NotFound if the image does not exist. @@ -113,7 +93,7 @@ class BaseImageService(object): """ raise NotImplementedError - def delete(self, image_id): + def delete(self, context, image_id): """ Delete the given image. @@ -121,68 +101,3 @@ class BaseImageService(object): """ raise NotImplementedError - - -class LocalImageService(BaseImageService): - - """Image service storing images to local disk. - - It assumes that image_ids are integers.""" - - def __init__(self): - self._path = "/tmp/nova/images" - try: - os.makedirs(self._path) - except OSError: # Exists - pass - - def _path_to(self, image_id): - return os.path.join(self._path, str(image_id)) - - def _ids(self): - """The list of all image ids.""" - return [int(i) for i in os.listdir(self._path)] - - def index(self): - return [dict(id=i['id'], name=i['name']) for i in self.detail()] - - def detail(self): - return [self.show(id) for id in self._ids()] - - def show(self, id): - try: - return pickle.load(open(self._path_to(id))) - except IOError: - raise exception.NotFound - - def create(self, data): - """ - Store the image data and return the new image id. - """ - id = random.randint(0, 2 ** 32 - 1) - data['id'] = id - self.update(id, data) - return id - - def update(self, image_id, data): - """Replace the contents of the given image with the new data.""" - try: - pickle.dump(data, open(self._path_to(image_id), 'w')) - except IOError: - raise exception.NotFound - - def delete(self, image_id): - """ - Delete the given image. Raises OSError if the image does not exist. - """ - try: - os.unlink(self._path_to(image_id)) - except IOError: - raise exception.NotFound - - def delete_all(self): - """ - Clears out all images in local directory - """ - for id in self._ids(): - os.unlink(self._path_to(id)) diff --git a/nova/image/services/__init__.py b/nova/image/services/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index b30ddb6671e9..7dbf6b733dc7 100644 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -245,7 +245,7 @@ def _confirm_rule(chain, cmd): def _remove_rule(chain, cmd): """Remove iptables rule""" if FLAGS.use_nova_chains: - chain = "%S" % chain.lower() + chain = "%s" % chain.lower() _execute("sudo iptables --delete %s %s" % (chain, cmd)) diff --git a/nova/objectstore/bucket.py b/nova/objectstore/bucket.py index 0ba4934d12f4..6979825388a7 100644 --- a/nova/objectstore/bucket.py +++ b/nova/objectstore/bucket.py @@ -78,8 +78,8 @@ class Bucket(object): path = os.path.abspath(os.path.join( FLAGS.buckets_path, bucket_name)) if not path.startswith(os.path.abspath(FLAGS.buckets_path)) or \ - os.path.exists(path): - raise exception.NotAuthorized() + os.path.exists(path): + raise exception.NotAuthorized() os.makedirs(path) diff --git a/nova/objectstore/handler.py b/nova/objectstore/handler.py index b26906001437..c8920b00c899 100644 --- a/nova/objectstore/handler.py +++ b/nova/objectstore/handler.py @@ -61,6 +61,7 @@ from nova.objectstore import image FLAGS = flags.FLAGS +flags.DEFINE_string('s3_listen_host', '', 'Host to listen on.') def render_xml(request, value): @@ -438,6 +439,7 @@ def get_application(): # Disabled because of lack of proper introspection in Twisted # or possibly different versions of twisted? # pylint: disable-msg=E1101 - objectStoreService = internet.TCPServer(FLAGS.s3_port, factory) + objectStoreService = internet.TCPServer(FLAGS.s3_port, factory, + interface=FLAGS.s3_listen_host) objectStoreService.setServiceParent(application) return application diff --git a/nova/objectstore/image.py b/nova/objectstore/image.py index b7b2ec6ab580..4554444fa262 100644 --- a/nova/objectstore/image.py +++ b/nova/objectstore/image.py @@ -48,8 +48,8 @@ class Image(object): self.image_id = image_id self.path = os.path.abspath(os.path.join(FLAGS.images_path, image_id)) if not self.path.startswith(os.path.abspath(FLAGS.images_path)) or \ - not os.path.isdir(self.path): - raise exception.NotFound + not os.path.isdir(self.path): + raise exception.NotFound @property def image_path(self): diff --git a/nova/rpc.py b/nova/rpc.py index ea36d69f4e30..86a29574f394 100644 --- a/nova/rpc.py +++ b/nova/rpc.py @@ -24,6 +24,7 @@ No fan-out support yet. import json import logging import sys +import time import uuid from carrot import connection as carrot_connection @@ -37,8 +38,8 @@ from nova import fakerabbit from nova import flags from nova import context -FLAGS = flags.FLAGS +FLAGS = flags.FLAGS LOG = logging.getLogger('amqplib') LOG.setLevel(logging.DEBUG) @@ -82,8 +83,24 @@ class Consumer(messaging.Consumer): Contains methods for connecting the fetch method to async loops """ def __init__(self, *args, **kwargs): - self.failed_connection = False - super(Consumer, self).__init__(*args, **kwargs) + for i in xrange(FLAGS.rabbit_max_retries): + if i > 0: + time.sleep(FLAGS.rabbit_retry_interval) + try: + super(Consumer, self).__init__(*args, **kwargs) + self.failed_connection = False + break + except: # Catching all because carrot sucks + logging.exception("AMQP server on %s:%d is unreachable." \ + " Trying again in %d seconds." % ( + FLAGS.rabbit_host, + FLAGS.rabbit_port, + FLAGS.rabbit_retry_interval)) + self.failed_connection = True + if self.failed_connection: + logging.exception("Unable to connect to AMQP server" \ + " after %d tries. Shutting down." % FLAGS.rabbit_max_retries) + sys.exit(1) def fetch(self, no_ack=None, auto_ack=None, enable_callbacks=False): """Wraps the parent fetch with some logic for failed connections""" @@ -91,11 +108,12 @@ class Consumer(messaging.Consumer): # refactored into some sort of connection manager object try: if self.failed_connection: - # NOTE(vish): conn is defined in the parent class, we can + # NOTE(vish): connection is defined in the parent class, we can # recreate it as long as we create the backend too # pylint: disable-msg=W0201 - self.conn = Connection.recreate() - self.backend = self.conn.create_backend() + self.connection = Connection.recreate() + self.backend = self.connection.create_backend() + self.declare() super(Consumer, self).fetch(no_ack, auto_ack, enable_callbacks) if self.failed_connection: logging.error("Reconnected to queue") diff --git a/nova/server.py b/nova/server.py index cb424caa19b9..a0ee54681a67 100644 --- a/nova/server.py +++ b/nova/server.py @@ -42,6 +42,8 @@ flags.DEFINE_bool('daemonize', False, 'daemonize this process') # clutter. flags.DEFINE_bool('use_syslog', True, 'output to syslog when daemonizing') flags.DEFINE_string('logfile', None, 'log file to output to') +flags.DEFINE_string('logdir', None, 'directory to keep log files in ' + '(will be prepended to $logfile)') flags.DEFINE_string('pidfile', None, 'pid file to output to') flags.DEFINE_string('working_directory', './', 'working directory...') flags.DEFINE_integer('uid', os.getuid(), 'uid under which to run') @@ -119,6 +121,8 @@ def daemonize(args, name, main): else: if not FLAGS.logfile: FLAGS.logfile = '%s.log' % name + if FLAGS.logdir: + FLAGS.logfile = os.path.join(FLAGS.logdir, FLAGS.logfile) logfile = logging.FileHandler(FLAGS.logfile) logfile.setFormatter(formatter) logger.addHandler(logfile) diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py index 52b392601036..639a2ebe4e4e 100644 --- a/nova/tests/api/openstack/fakes.py +++ b/nova/tests/api/openstack/fakes.py @@ -29,7 +29,7 @@ from nova import flags from nova import exception as exc import nova.api.openstack.auth from nova.image import service -from nova.image.services import glance +from nova.image import glance from nova.tests import fake_flags from nova.wsgi import Router @@ -76,7 +76,7 @@ def stub_out_image_service(stubs): def fake_image_show(meh, id): return dict(kernelId=1, ramdiskId=1) - stubs.Set(nova.image.service.LocalImageService, 'show', fake_image_show) + stubs.Set(nova.image.local.LocalImageService, 'show', fake_image_show) def stub_out_auth(stubs): @@ -151,21 +151,19 @@ def stub_out_glance(stubs, initial_fixtures=[]): self.fixtures = [] fake_parallax_client = FakeParallaxClient(initial_fixtures) - stubs.Set(nova.image.services.glance.ParallaxClient, 'get_image_index', + stubs.Set(nova.image.glance.ParallaxClient, 'get_image_index', fake_parallax_client.fake_get_image_index) - stubs.Set(nova.image.services.glance.ParallaxClient, 'get_image_details', + stubs.Set(nova.image.glance.ParallaxClient, 'get_image_details', fake_parallax_client.fake_get_image_details) - stubs.Set(nova.image.services.glance.ParallaxClient, 'get_image_metadata', + stubs.Set(nova.image.glance.ParallaxClient, 'get_image_metadata', fake_parallax_client.fake_get_image_metadata) - stubs.Set(nova.image.services.glance.ParallaxClient, 'add_image_metadata', + stubs.Set(nova.image.glance.ParallaxClient, 'add_image_metadata', fake_parallax_client.fake_add_image_metadata) - stubs.Set(nova.image.services.glance.ParallaxClient, - 'update_image_metadata', + stubs.Set(nova.image.glance.ParallaxClient, 'update_image_metadata', fake_parallax_client.fake_update_image_metadata) - stubs.Set(nova.image.services.glance.ParallaxClient, - 'delete_image_metadata', + stubs.Set(nova.image.glance.ParallaxClient, 'delete_image_metadata', fake_parallax_client.fake_delete_image_metadata) - stubs.Set(nova.image.services.glance.GlanceImageService, 'delete_all', + stubs.Set(nova.image.glance.GlanceImageService, 'delete_all', fake_parallax_client.fake_delete_all) diff --git a/nova/tests/api/openstack/test_images.py b/nova/tests/api/openstack/test_images.py index 0f3941c29df9..f610cbf9cf21 100644 --- a/nova/tests/api/openstack/test_images.py +++ b/nova/tests/api/openstack/test_images.py @@ -28,6 +28,7 @@ import unittest import stubout import webob +from nova import context from nova import exception from nova import flags from nova import utils @@ -52,12 +53,13 @@ class BaseImageServiceTests(object): 'serverId': None, 'progress': None} - num_images = len(self.service.index()) + num_images = len(self.service.index(self.context)) - id = self.service.create(fixture) + id = self.service.create(self.context, fixture) self.assertNotEquals(None, id) - self.assertEquals(num_images + 1, len(self.service.index())) + self.assertEquals(num_images + 1, + len(self.service.index(self.context))) def test_create_and_show_non_existing_image(self): @@ -68,14 +70,15 @@ class BaseImageServiceTests(object): 'serverId': None, 'progress': None} - num_images = len(self.service.index()) + num_images = len(self.service.index(self.context)) - id = self.service.create(fixture) + id = self.service.create(self.context, fixture) self.assertNotEquals(None, id) self.assertRaises(exception.NotFound, self.service.show, + self.context, 'bad image id') def test_update(self): @@ -87,12 +90,12 @@ class BaseImageServiceTests(object): 'serverId': None, 'progress': None} - id = self.service.create(fixture) + id = self.service.create(self.context, fixture) fixture['status'] = 'in progress' - self.service.update(id, fixture) - new_image_data = self.service.show(id) + self.service.update(self.context, id, fixture) + new_image_data = self.service.show(self.context, id) self.assertEquals('in progress', new_image_data['status']) def test_delete(self): @@ -111,20 +114,20 @@ class BaseImageServiceTests(object): 'serverId': None, 'progress': None}] - num_images = len(self.service.index()) - self.assertEquals(0, num_images, str(self.service.index())) + num_images = len(self.service.index(self.context)) + self.assertEquals(0, num_images, str(self.service.index(self.context))) ids = [] for fixture in fixtures: - new_id = self.service.create(fixture) + new_id = self.service.create(self.context, fixture) ids.append(new_id) - num_images = len(self.service.index()) - self.assertEquals(2, num_images, str(self.service.index())) + num_images = len(self.service.index(self.context)) + self.assertEquals(2, num_images, str(self.service.index(self.context))) - self.service.delete(ids[0]) + self.service.delete(self.context, ids[0]) - num_images = len(self.service.index()) + num_images = len(self.service.index(self.context)) self.assertEquals(1, num_images) @@ -135,8 +138,9 @@ class LocalImageServiceTest(unittest.TestCase, def setUp(self): self.stubs = stubout.StubOutForTesting() - service_class = 'nova.image.service.LocalImageService' + service_class = 'nova.image.local.LocalImageService' self.service = utils.import_object(service_class) + self.context = context.RequestContext(None, None) def tearDown(self): self.service.delete_all() @@ -151,8 +155,9 @@ class GlanceImageServiceTest(unittest.TestCase, def setUp(self): self.stubs = stubout.StubOutForTesting() fakes.stub_out_glance(self.stubs) - service_class = 'nova.image.services.glance.GlanceImageService' + service_class = 'nova.image.glance.GlanceImageService' self.service = utils.import_object(service_class) + self.context = context.RequestContext(None, None) self.service.delete_all() def tearDown(self): @@ -187,7 +192,7 @@ class ImageControllerWithGlanceServiceTest(unittest.TestCase): def setUp(self): self.orig_image_service = FLAGS.image_service - FLAGS.image_service = 'nova.image.services.glance.GlanceImageService' + FLAGS.image_service = 'nova.image.glance.GlanceImageService' self.stubs = stubout.StubOutForTesting() fakes.FakeAuthManager.auth_data = {} fakes.FakeAuthDatabase.data = {} diff --git a/nova/twistd.py b/nova/twistd.py index 3ec0ff61e46b..cb5648ce64c3 100644 --- a/nova/twistd.py +++ b/nova/twistd.py @@ -43,6 +43,8 @@ else: FLAGS = flags.FLAGS +flags.DEFINE_string('logdir', None, 'directory to keep log files in ' + '(will be prepended to $logfile)') class TwistdServerOptions(ServerOptions): @@ -246,6 +248,8 @@ def serve(filename): FLAGS.logfile = '%s.log' % name elif FLAGS.logfile.endswith('twistd.log'): FLAGS.logfile = FLAGS.logfile.replace('twistd.log', '%s.log' % name) + if FLAGS.logdir: + FLAGS.logfile = os.path.join(FLAGS.logdir, FLAGS.logfile) if not FLAGS.prefix: FLAGS.prefix = name elif FLAGS.prefix.endswith('twisted'): diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 535a3b53ec21..18085089f3b5 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -420,7 +420,7 @@ class LibvirtConnection(object): @defer.inlineCallbacks def _create_image(self, inst, libvirt_xml, prefix='', disk_images=None): # syntactic nicety - basepath = lambda fname='', prefix=prefix: os.path.join( + basepath = lambda fname = '', prefix = prefix: os.path.join( FLAGS.instances_path, inst['name'], prefix + fname) @@ -457,7 +457,7 @@ class LibvirtConnection(object): yield images.fetch(inst.ramdisk_id, basepath('ramdisk'), user, project) - execute = lambda cmd, process_input=None, check_exit_code=True: \ + execute = lambda cmd, process_input = None, check_exit_code = True: \ process.simple_execute(cmd=cmd, process_input=process_input, check_exit_code=check_exit_code) diff --git a/nova/virt/xenapi.py b/nova/virt/xenapi.py index 0f563aa41c12..3169562a5318 100644 --- a/nova/virt/xenapi.py +++ b/nova/virt/xenapi.py @@ -286,11 +286,21 @@ class XenAPIConnection(object): # Don't complain, just return. This lets us clean up instances # that have already disappeared from the underlying platform. defer.returnValue(None) + # Get the VDIs related to the VM + vdis = yield self._lookup_vm_vdis(vm) try: task = yield self._call_xenapi('Async.VM.hard_shutdown', vm) yield self._wait_for_task(task) except Exception, exc: logging.warn(exc) + # Disk clean-up + if vdis: + for vdi in vdis: + try: + task = yield self._call_xenapi('Async.VDI.destroy', vdi) + yield self._wait_for_task(task) + except Exception, exc: + logging.warn(exc) try: task = yield self._call_xenapi('Async.VM.destroy', vm) yield self._wait_for_task(task) @@ -325,6 +335,30 @@ class XenAPIConnection(object): else: return vms[0] + @utils.deferredToThread + def _lookup_vm_vdis(self, vm): + return self._lookup_vm_vdis_blocking(vm) + + def _lookup_vm_vdis_blocking(self, vm): + # Firstly we get the VBDs, then the VDIs. + # TODO: do we leave the read-only devices? + vbds = self._conn.xenapi.VM.get_VBDs(vm) + vdis = [] + if vbds: + for vbd in vbds: + try: + vdi = self._conn.xenapi.VBD.get_VDI(vbd) + # Test valid VDI + record = self._conn.xenapi.VDI.get_record(vdi) + except Exception, exc: + logging.warn(exc) + else: + vdis.append(vdi) + if len(vdis) > 0: + return vdis + else: + return None + def _wait_for_task(self, task): """Return a Deferred that will give the result of the given task. The task is polled until it completes.""" diff --git a/nova/wsgi.py b/nova/wsgi.py index b04b487eabc2..c7ee9ed146e2 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -28,7 +28,7 @@ from xml.dom import minidom import eventlet import eventlet.wsgi -eventlet.patcher.monkey_patch(all=False, socket=True) +eventlet.patcher.monkey_patch(all=False, socket=True, time=True) import routes import routes.middleware import webob diff --git a/setup.py b/setup.py index dab601290f1a..33d815fa6361 100644 --- a/setup.py +++ b/setup.py @@ -18,11 +18,19 @@ from setuptools import setup, find_packages from setuptools.command.sdist import sdist +from sphinx.setup_command import BuildDoc import os import subprocess +class local_BuildDoc(BuildDoc): + def run(self): + for builder in ['html', 'man']: + self.builder = builder + self.finalize_options() + BuildDoc.run(self) + class local_sdist(sdist): """Customized sdist hook - builds the ChangeLog file from VC first""" @@ -44,7 +52,8 @@ setup(name='nova', author='OpenStack', author_email='nova@lists.launchpad.net', url='http://www.openstack.org/', - cmdclass={'sdist': local_sdist}, + cmdclass={ 'sdist': local_sdist, + 'build_sphinx' : local_BuildDoc }, packages=find_packages(exclude=['bin', 'smoketests']), scripts=['bin/nova-api', 'bin/nova-compute',