History | View | Annotate | Download (10.3 kB)
cyclades: Common filtering based on changes-since
Add 'filter_modified_since' function in snf_django api utils, forparsing 'changes-since' HTTP parameter and filter the DB objects thatare updated after that date. Otherwise the deleted objects are returned.
cyclades: Separate logic for networks from API
Remove code handling networks from network API views to logic.networks
cyclades: Do not delete networks with floating IPs
Forbid network deletion in case the network has allocated floating IPs,no matter whether they are used by instances or not. Update'allocate_floating_ip' API method, to take exclusive lock on networkbefore reserving a floating IP, to avoid race condition between deleting...
cyclades: Major refactor to api and logic apps
Major refactor to cyclades api and logic apps that removes most codefrom the api views and moves it to logic app, so that the same logiccode can be used by different apps (e.g. EC2 API). Code is moved into...
cyclades: api_method_not_allowed typo's
cyclades: Add 'links' to compute endpoints
Add 'links' attribute to API responses for servers, networks, flavorsand images endpoints.
cyclades: Add 'user_id' and 'tenant_id' to API
Add 'user_id' to API responses, and add a dummy 'tenant_id' to be equalwith the 'user_id'. Also always include metadata.
cyclades: Remove "values" term from API
For compatibility with OpenStack Compute API v2, we remove theterm 'values' from all JSON requests and responses.
Refs #3768
cyclades: Fixes relevant to lazy networks
cyclades: Implement lazy networks
Implement "lazy networks", which are not created to all Ganeti backendsupon creation, but only when an instance that resides in a Ganeti isconnected to that network.
Update 'create_network' to create the Network object in DB without...
cyclades: refactor code relative to commission
Refactor Cyclades code that handles commissioning with Quotaholder. Thiscommit removes the 'uses_commission' decorator. Instead it introducesthe 'issue_and_accept_commission' function that is responsible for...
Remove VM/Network DeletedError and BuildingError
Handle these errors explicitly in the code instead of the "api_method" decorator.
Use common 'api_method' decorator to cyclades api
Update Cyclades API methods to use the new common 'api_method'decorator. Also, update all the relevant tests.
Move cloud faults to 'snf_django.lib.api.faults'
Gather all faults from all synnefo projects into common'snf_django.lib.api.faults'.
Make 'type' parameter for network-create mandatory
Do not use a default value (was "MAC_FILTERED") for "type" parameter of"network_create" API method. The client must explicitly choose thenetwork type.
Create public NIC when creating VM
Until now, a server's public NetworkInterface was not created in the DBuntil the arrival of the message from Ganeti hooks. However, the IPv4address of the NIC is reserved before sending the OP_INSTANCE_CREATEjob to Ganeti....
Validate all network-create parameters
Fix bug: Detect malformed network subnet
Fix bug in Cyclades network API. API should raise BadRequest ifspecified network subnet is invalid. Also, do not allow subnets withhost bits set (like 10.0.0.1/28).
pep8 fixes
Fix bug in networks create
re-raise the exception after rolling back transaction
Handle transaction manually when creating network
When creating private networks, commit the transaction before sendingthe job to all Ganeti backends. If communication with all Ganetibackends is included in the transaction, notifications from backendsmay be received before the Network entry is created in the DB.
Introduce network flavors to replace network types
Add tags and mode to network db model. Replace existing type withflavor. Introduce 4 different flavors. Each flavor has mode, link,mac_prefix, tags. Supported flavors are CUSTOM, IP_LESS_ROUTED,MAC_FILTERED, PHYSICAL_VLAN and are hardcoded in db models....
Issue commissions when creating server/networks
Issue commissions to the Quotaholder when creating a VM or a Network.The VM/Network that is associated with the corresponding serial in DB.Also, the serial is marked as accepted because at the end of thetransaction the resource will be present in the DB. Even in case the...
Sort all API list_* responses
Use the per-user network limit setting
Merge branch 'master' into devel-0.12
Conflicts: snf-cyclades-app/synnefo/api/management/commands/flavor-list.py snf-cyclades-app/synnefo/api/management/commands/server-list.py snf-cyclades-app/synnefo/api/networks.py snf-cyclades-app/synnefo/logic/rapi.py
Forbid creation of non enabled networks
PUBLIC_ROUTED minor changes
Do not allow api to create public networks and type otherthan PRIVATE_MAC_FILTERED/PRIVATE_PHYSICAL_VLAN.
Rename PUBLIC_ROUTED_USE_POOL setting to PUBLIC_USE_POOL.
Let synnefo do IP pool management only if network is private or...
Fix HTTP response code when refusing action
Return Forbidden(403) instead of Unauthorized(401) when refusing arequested action, because the VM is suspended or the resource is public.Unauthorized should be used only when authentication is required and has...
Do not allow any API action on suspended VMs
Do not allow any modification of any administratively suspended VM through theAPI.
Do not allow actions to deleted networks
Return ServiceUnavailable when pools are depleted
Return ServiceUnavailable, instead of OverLimit, when pools of bridges,mac-prefixes or IPs run out of resources.
Catch OverLimit error in network create
Change logging levels
Add extra logging
Fix race conditions when updating network objects
Use for_update() object manager in order to exclude race conditionswhen updating network objects.
Unique mac-prefix only for mac-filtered networks
Refactor bridge and mac-prefix pool tables
Redesign the implementation of pools and map mac-prefix and bridge poolsto that design.
Each pool type is mapped to a table in the database, and each row ofthat table is a pool of that type. All pool tables must contain the...
New method for creating BackendNetwork entries
Create a new method to the Network model, in order to create theBackendNetwork entries tha correspond to this network. Also removethe custom save method, since when multiple public network will besupported, we want them to be correlated with specific backends.
Implement multiple public networks
Implement multiple public networks in order to support:- different public networks per backend- non-consecutive IP ranges in each backend
To support this, public networks are treated different from privateones. Namely, they are correlated with one backend (and so have...
Do not allow creation of two big/small networks
- Networks smaller than /29 are not supported in Ganeti.- Big networks will result in degraded performance in Ganetiand DB due to the big reservation map.
Networks list api response fix
include deleted networks in reponse if changes-since parameter is set. Thisenables ui application to identify deleted networks and remove them fromuser interface.
Fix bug in creating network
Exclude deleted networks.
Limit allowed private networks per user
Store action when creating a network
Implement MAC Prefix Management
In order to guarantee uniqueness of MAC address accross all backends,synnefo assignes a unique mac prefix to each network in each backend.
A mac-prefix of 20 bits, which is picked from the MacPrefixPool, isassigned to each Network. The mac-prefix of the network in each...
Limit allowed network size
Limit the size of networks that users can create, since big IPpools can have negative impact on performance. Allowed networksize is controled by 'MAX_CIDR_BLOCK' setting.
Add transaction control to API methods
Specially for create_instance and create_network methods, since aVirtualMachine, Network object is created before sending the requestto the backend.
Add support for IPv6
- Extend the Network model with fields for holding the IPv6 subnet and gateway.- Update network API methods.- Modify ganeti hooks to return IPv6 address for all network interfaces. IPv6 is now derived from the IPv6 subnet of the network in Ganeti,...
New management command for creating a network
Create a management command for creating networks. Also removethe initial_data.json, since it is currently not necessary.
Update network settings
Filter deleted entries when changes-since is used
Modify list_networks and list_servers to filter deleted entries whenif-modified-since HTTP header is used, because deleted entries can beupdated after deletion through the reconciliation mechanism.
Handle bridge/mac-prefix pool exhaustion
Raise Overlimit exception when either bridge or mac-prefix poolis exhausted. Also prohibit public network creation.
Add dirty bit to NetworkInterface
Extend NetworkInterface model with a dirty bit, indicating whetherthe index of the NIC is consistent with the one in Ganeti. This flag isset when deleting a NIC, and is switched off after processing thenotification from Ganeti. Removing a NIC with the dirty bit on is not...
Update servers/networks responses for new API
- Reponses for servers and netowrks details (list or solo) are nowconsistent to recent backend changes.- Methods get_nic_from_index and construct_nic_id have been created- Syntax for nic removal from network/vm has been adjusted
When creating network, the label subnet can now be cdir in the json request
Fix bug in networks api
Temporary API modification for new style networks
Simple per user quota mechanism for networks/vms
- New dict setting VMS_USER_QUOTA to allow setting per user quota (overrides MAX_VMS_PER_USER setting)- Private networks quota mechanism (based on MAX_NETWORKS_PER_USER and NETWORKS_USER_QUOTA settings)...
Use lib.astakos instead of our own middleware
Switch to the logging middleware
Merge remote-tracking branch 'origin/master' into astakos-integration
Conflicts: runtests.sh snf-cyclades-app/synnefo/aai/__init__.py snf-cyclades-app/synnefo/aai/fixtures/auth_test_data.json snf-cyclades-app/synnefo/aai/middleware.py snf-cyclades-app/synnefo/aai/models.py...
Renamed snf-app to snf-cyclades-app