Start neutron api
Add views for network, subnet, port. Fix urls. Create first versionof /networks. Start testing networks
cyclades: Fix wrong quotas when creating server
Catch exception when talking to Ganeti inside 'server_command',otherwise the pending commission will be rejected. Also, accept thecommission in case of build, because the VM will be created in DB.
cyclades: Helper function for commissioning
Create 'quotas.handle_resource_commission' function for handlingcommissions for VMs and Networks.
cyclades: Handle errors during vm creation
Commit #f2080d1 mocked an OP_INSTANCE_REMOVE when enqueuing anOP_INSTANCE_CREATE job to Ganeti failed. However, this may result inreleasing IPs that may get reserved in Ganeti, because we can neverreally know if the job has reached Ganeti or not (e.g. timeout). For...
cyclades: Add missing commit_on_success decorator
cyclades: Add quotas for build server action
cyclades: refactor server creation command
Split the server creation command in more steps in order to bedecorated with the 'server_command' function and follow the logic of allother server commands. The main change is that the commission job is notaccepted when the VM is stored in DB, but when the OP_INSTANCE_CREATE...
cyclades: Apply old commits to moved files
Code from file 'api/servers.py' has been moved to 'logic/servers.py'.During the merge of hotfix-0.14.6 the develop, this code was lost. Thiscommit applies commits #f2080d1, #ea9b0fb, #32a0b85 to the new file.
Merge branch 'master' into develop
Conflicts: Changelog version
helpdesk: Fix network interface queryset
Merge branch 'hotfix-0.14.6' into develop
Conflicts: Changelog docs/admin-guide.rst snf-cyclades-app/synnefo/api/management/commands/network-remove.py snf-cyclades-app/synnefo/api/servers.py snf-cyclades-app/synnefo/api/tests/servers.py snf-cyclades-app/synnefo/logic/backend.py...
helpdesk: Exclude nics of deleted vms
when helpdesk users search using ip address
cyclades: Mock vm removal if creation fails
In case creating a VM fails before the OP_INSTANCE_CREATE job isenqueued in Ganeti, the VM and its NICs must be deleted, and theresources must be released from Quotaholder, which is exactly what isdone when a VM is deleted from Ganeti. Instead of duplicating the code,...
cyclades: Fix bug during server creation
Commit #32a0b85, modified server creation, by refetching the object fromDB after issuing commission to quotaholder. However, the new object isnot having the 'config_url' attributed, which is added to the vm object...
cyclades: Make GanetiRapiClient work with gevent
GanetiRapiClient uses PyCurl, a Python interface to libcurl, andperforms blocking requests, so does not work well with gevent. Thiscommit makes GanetiRapiClient to use 'Requests' HTTP library that isgreenlet-safe.
Merge branch 'feature-ui-footer-extra-message' into hotfix-0.14.6
cyclades: Fix unbound reference
Set backend to None if not specified.
branding: new setting FOOTER_EXTRA_MESSAGE
FOOTER_EXTRA_MESSAGE setting appears above Copyright message at theCompute templates and the Dashboard UI. Accepts html tags.
cyclades: Simplify code
Simplify code by removing unnecessary temp variable.
cyclades: Do not release resources if already deleted
Ensure that a commission to release vm resources is issued only once.If a vm is marked `deleted', then resources must have already beenreleased.
cyclades: Do not save stale objects after a commit
Call to issue_and_accept_commission saves the resource object (eg a vm)and commits the transaction. This has the side-effect that the resourceobject becomes stale: its lock is released and another thread may acquire...
common: Strip trailing slash from endpoints
Remove trailing slash from the endpoints' publicURL field in servicedefinitions. These values end up in the response of POST /tokens, and,according to the keystone API, should not end in slash. A trailing slash...
cyclades: Add newline
cyclades: fix typos
cyclades: Update NICs even if job failed
Make snf-ganeti-eventd send the NICs of the instance not only onsuccess, but also if the job has failed or has been canceled. Also,update snf-dispatcher to handle those messages. This step is required toclear BUILDING NICs that fail.
cyclades: Store action to the VM
cyclades: Fix bug in reconciliation
VMs at building error that do not exist in Ganeti must not be reportedas stale. The VM is stale only if the user has asked to destroy the VM,and so the action is DESTROY.
Update objpool dependency to version 0.3
cyclades: Make index field of NIC optional
Change 'index' field of NIC model to be optional, because the index ofbuilding NICs is unknown. Also, change all API responses to return onlythe active NICs.
cyclades: Create NIC before send job to Ganeti
Create NICs in building state before enqueuing corresponding jobs toGaneti. This has already been done when creating the instance, but notwhen connecting it to other networks.
cyclades: Fix bug in snf-dispatcher logic
This commit reverts commits #07602322 and #30514662 which introduced abug in dispatcher's logic. These commit fixed the issue that, in a casethe Cyclades DB is unsynced with Ganeti, a resource that does not exist...
Move context_processors from common to middleware
cyclades: Fix bug in handling of reboot type.
'type' attribute of reboot OS API call was directly mapped to the'reboot_type' option of Ganeti reboot job. However these two aresemantically different. The 'SOFT' and 'HARD' reboot types of OS API aremapped to 'shutdown_timeout' option of Ganeti jobs. However, setting...
cyclades: Do not pass 'hotplug' if disabled
Fix passing of hotplug argument to GanetiRAPIClient, in case theGANETI_USE_HOTPLUG is unset. If the Ganeti version does not supporthotplug, passing hotplug=False, will make the jobs fail at Ganeti opcodevalidation. This commit fixes this by passing the argument, only when...
cyclades: Fix broken tests from commit #c172f4a
Commit #c172f4a used the "size" attribute of images. This commitfixes mocked images of tests to contain this attribute.
Pass hashmap instead of location to snf-image
Update Cyclades, to pass as 'img_id' the hashmap('checksum') of theimage, instead of the location URL. In that way, snf-image does not anyaccess to the Pithos database.
cyclades: Fix call to api_method_not_allowed
cyclades: Add check for net action with no hotplug
In case hotplug is disabled, via GANETI_USE_HOTPLUG setting, networkactions should be allowed only on STOPPED vms. This commit adds thischeck and a unittest for this case. Also it makes some other checks...
cyclades: Fix check for firewall profile
cyclades: Remove firewall tag when removing NIC
Remove firewall tag from ganeti instance when disconnecting them fromnetworks. Until now, this was not needed because a vm could not bedisconnected from public networks. Since floating IPs, a vm may bedynamically be connected and disconnected to public networks, and so a...
cyclades: Fix bug in servers tests
Import settings from django.conf instead of synnefo.
cyclades: PEP8 fixes to tests module
cyclades: extend VM info with 'port_forwarding'
Extend servers info API response with 'SNF:port_forwarding' attribute,describing port fowarding rules (DNAT) that are applied to vms. Thedescription of such rules is done via the new CYCLADES_PORT_FORWARDING...
cyclades: Import settings from django.conf
cyclades: init dispatcher with DJANGO_SETINGS_MODULE
cyclades: Extend servers info with fqdn attribute
Extend the servers info API response with the 'SNF:fqdn' attribute,containg the vm's domain name in a DNS. This attribue is configurable bythe 'CYCLADES_SERVERS_FQDN' setting. If this setting is set to None,...
cyclades: add tests for 'fqdn'
cyclades ui: Improve available quota handling
handle the case where available resource quota is less than thecorresponding active quota (for cpu, mem and disk resources).
cyclades: Fix typo
cyclades ui: Fix typo in VM resize
cyclades: Fix bugs in modifying network to IP pool
cyclades ui: Handle empty floating ip pools
prevent user from allocating new ip addresses if no available pools exist
cyclades: Fix condition for network netmask size
cyclades: Check that IPv6 network netmask is /64
Check that IPv6 network netmask is /64, because this is imposed by the'mac2eui64' utility that generates EUI-64 addresses from 48-bit MACaddresses.
Refs #4201
cyclades: Move code for validating network values
Move code for network parameters validation from 'api' module to 'logic'.
Fix stale import statements
Commit 7cfc0ce moved code from webproject to snf_django. This commitfixes some stale imports that skipped renaming.
cyclades: Remove assumptions from tests
Remove some hard-coded IDs from tests.
snf-django: Move ListCommand to snf-django
snf-webproject contained the generic ListCommand, and because of this ithad a dependency from snf-django-lib. This commit moves this command fromsnf-webproject to snf-django-lib and removes this dependency. Also,...
Update South dependency to >=0.7.3
cyclades: Create network in all backends
Add option in snf-manage network-create command to create network in allbackends.
cyclades: More verbose models representation
Make unicode method of VirtualMachine, Network and FloatingIP models moreverbose.
cyclades: Add 'name' to all commissions.
Make all quotaholder commissions to have a name. Since, Cyclades doesnot store the association of a commission with a resource, we includethe resource in the commission name.
cyclades: Add network to multiple backends
Update snf-manage network-create command to take a list of commaseperated backend IDs to create the network to.
Merge branch 'hotfix-0.14.3' into develop
Conflicts: Changelog snf-astakos-app/astakos/im/messages.py snf-pithos-app/pithos/api/manage_accounts/__init__.py snf-pithos-app/pithos/api/management/commands/reconcile-resources-pithos.py snf-pithos-app/pithos/api/settings.py...
cyclades: Add check for link during network create
Add a check when creating IP_LESS_ROUTED networks, that the connectivitylink is not already used by another network.
cyclades: Fixes in network management commands
Merge code from logic/networks.py and network management commands.
cyclades: Exclude FIP pools from IP allocation
Do not include the floating IP pools, to the available public networkswhen allocating an IPv4 address, when 'SNF:ANY_PUBLIC' option is used.
cyclades: Set firewall profile per NIC
Set firewall profile per NIC, because since Floating IPs an instance canhave more than one NICs in a public network. Extend the API call to takethe NIC index as argument, and modify the Ganeti instance tags to beformated with the NIC index.
cyclades-rapi: Add bulk option to GetJobs
cyclades: Reconciliation for pending vm tasks
Extend reconciliation mechanism, to detect instances with stale pendingtasks, by looking if the corresponding job, 'vm.task_job_id', is stillrunning in the Ganeti backend.
Also refactor code that performed reconciliation for buildign vms, to...
cyclades: Remove wrong model attribute
cyclades: Fix bug in network-modify command
Fix bug caused by wrong identation level. Modification of network inGaneti should be performed only if 'add_reserved_ips' or'remove_reserved_ips' options are used.
cyclades: Convert network to floating IP pool
Add '--floating-ip-pool' option to network-modify management command, inorder to convert a network to a floating IP pool. Conversation of anetwork to a floating IP pool requires the creation of the network to...
cyclades: Add migration file for IPv6 networks
cyclades: Display task and task_job_id
Make 'server-show' and 'server-inspect' management command to displaythe 'task' and 'task_job_id' fields of the vm.
cyclades: Minor improvements in manage commands
cyclades: Fix import of renamed settings
cyclades ui: Enable RDP clipboard sharing by default
in default RDP connection profile served by synnefo
cyclades: No commission for public networks
Do not issue commission for public networks, since they do not have anowner.
cyclades: Fix exception message
cyclades: Consider IPv6 only networks in allocator
Backend allocator excludes backends that do not have a free IPv4address. Since, from now on, not all instances are connected to a publicnetwork, this check is only needed when 'SNF:ANY_PUBIC' network is used.
cyclades: Implement NetworkReconciler class
Refactory network reconciliation. Implement NetworkReconciler class tohold all reconciliation functions.
cyclades: Move NetworkReconciler to reconciliation
Move NetworkReconciler class from network-create command toreconciliation module.
cyclades: Add tests for network reconciliation
cyclades: Simple code refactoring
cyclades: Support IPv6 only networks
Make Cyclades support IPv6 only networks. Such networks will havethe 'subnet' attribute set to None, in the same way that IPv4 onlynetworks have the 'subnet6' attribute set to None.
Because currently Ganeti does not support IPv6 only networks, we create the...
cyclades: Add tests for IPv6 only networks
Add tests to check creation and usage of IPv6 only networks. Tests alsocover creation of other type of networks.
cyclades: Refactor code relative to networks
Move code checks from network-create management command tologic/networks.py.
Also create common decorator for management commands to convert apifaults to command errors.
cyclades: Refactor logic tests
Create tests module to hold all tests for logic.
Cyclades: Fix typo in conf file
Merge branch 'hotfix-0.14.2' into develop
Conflicts: Changelog snf-astakos-app/astakos/im/messages.py snf-astakos-app/astakos/im/views/target/__init__.py snf-cyclades-app/synnefo/logic/backend.py snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py...
cyclades ui: Prefer os meta to identify connection user
How vm connection user gets resolved:
- Use the last user in `users` vm metadata if exists- Use the last user in `users` vm image metadata if exists- Use root if vm's image osfamily metadata is Linux...
cyclades: Move tests in tests directory
cyclades ui: Update OS images names
use libguestfs naming convention
redhat -> rhelsuse -> opensuse (also cloned as sles)
plankton: Make pithos backend pool size a setting
Make the pool size of the pithos backends a configurable setting,namely PITHOS_BACKEND_POOL_SIZE.
cyclades: pep8 fixes
cyclades: Add size and free to floating-ip-pools
cyclades: Fix reconciliation of building vms
When reconciling a building vm, you first have to reconciliation it'screation and then it's operstate. Otherwise it is possible to end uphaving wrong quotas.
pep8 changes