-
Christos Stavrakakis authored
Fix the default behaviour for networking of servers that are being created. There are two settings controlling this behaviour: * CYCLADES_DEFAULT_SERVER_NETWORKS: This setting contains list of networks to connect a newly created server to, if the user has not specified them explicitly in the POST /server API call. Each member of the list may be a network UUID, a tuple of network UUIDs, "SNF:ANY_PUBLIC_IPV4" [any public network with an IPv4 subnet defined], "SNF:ANY_PUBLIC_IPV6 [any public network with only an IPV6 subnet defined], or "SNF:ANY_PUBLIC" [any public network]. Access control and quota policy are enforced, just as if the user had specified the value of CYCLADES_DEFAULT_SERVER_NETWORKS in the content of the POST /call, after processing of "SNF:*" directives. Default value: ["SNF:ANY_PUBLIC"] * CYCLADES_FORCED_SERVER_NETWORKS: This setting contains a list of networks which every new server will be forced to connect to, regardless of the contents of the POST /servers call, or the value of CYCLADES_DEFAULT_SERVER_NETWORKS. Its format is identical to that of CYCLADES_DEFAULT_SERVER_NETWORKS. No access control or quota policy are enforced. The server will get all IPv4/IPv6 addresses needed to connect to the networks specified in CYCLADES_FORCED_SERVER_NETWORKS, regardless of the state of the floating IP pool of the user, and without allocating any floating IPs. Default value: ["SNF:ANY_PUBLIC_IPV6"] Also this commit changes how API handles requests that specify a public network without specifying a floating IP address: If the request does not contain the 'fixed_ip' attribute, the server will try to automatically use one of the free floating IP addresses of the user that are allocated from the specified network.
056eee6c