Cleaned up obsolete network-related stuff

One of these checks was preventing FloatingIpField from being displayed properly.

Change-Id: Iaa4c47211717d30bc4c247c92ffed42045942056
Partial-bug: #1314193
This commit is contained in:
Alexander Tivelkov 2014-04-29 17:38:24 +04:00
parent c45abb7952
commit 1d29c54ba5
2 changed files with 4 additions and 15 deletions

View File

@ -537,13 +537,11 @@ class BooleanField(forms.BooleanField, CustomPropertiesField):
super(BooleanField, self).__init__(*args, **kwargs)
# This type of field is deprecated, in future floating ip fields should be
# implemented using a regular BooleanField
# TODO(ativelkov, tsufiev): add a deprecated decorator
class FloatingIpBooleanField(BooleanField):
@with_request
def update(self, request, environment_id, **kwargs):
env = api.environment_get(request, environment_id)
network_topology = env.networking.get('topology')
if network_topology not in ('routed', 'manual'):
self.widget.attrs['disabled'] = True
pass
class ClusterIPField(CharField):

View File

@ -165,12 +165,3 @@ except ImportError:
if DEBUG:
logging.basicConfig(level=logging.DEBUG)
ADVANCED_NETWORKING_CONFIG = {
# Maximum number of environments that can be processed simultaneously
'max_environments': 100,
# Maximum number of VMs per environment
'max_hosts': 250,
# Template IP address for generating environment subnet cidrs
'env_ip_template': '10.0.0.0'
}