| 1 |
# Copyright 2016 GoDaddy. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 12 |
# implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
|
| 16 |
ALIAS = 'network-ip-availability' |
| 17 |
IS_SHIM_EXTENSION = False |
| 18 |
IS_STANDARD_ATTR_EXTENSION = False |
| 19 |
NAME = 'Network IP Availability' |
| 20 |
API_PREFIX = '' |
| 21 |
DESCRIPTION = 'Provides IP availability data for each network and subnet.' |
| 22 |
UPDATED_TIMESTAMP = '2015-09-24T00:00:00-00:00' |
| 23 |
RESOURCE_NAME = "network_ip_availability" |
| 24 |
RESOURCE_PLURAL = "network_ip_availabilities" |
| 25 |
COLLECTION_NAME = RESOURCE_PLURAL.replace('_', '-') |
| 26 |
RESOURCE_ATTRIBUTE_MAP = { |
| 27 |
RESOURCE_PLURAL: { |
| 28 |
'network_id': { |
| 29 |
'allow_post': False, 'allow_put': False, |
| 30 |
'is_visible': True, 'is_filter': True, |
| 31 |
'primary_key': True, 'is_sort_key': True |
| 32 |
}, |
| 33 |
'network_name': { |
| 34 |
'allow_post': False, 'allow_put': False, |
| 35 |
'is_visible': True, 'is_filter': True |
| 36 |
}, |
| 37 |
'tenant_id': { |
| 38 |
'allow_post': False, 'allow_put': False, |
| 39 |
'is_visible': True, 'is_filter': True |
| 40 |
}, |
| 41 |
'total_ips': { |
| 42 |
'allow_post': False, 'allow_put': False, |
| 43 |
'is_visible': True |
| 44 |
}, |
| 45 |
'used_ips': { |
| 46 |
'allow_post': False, 'allow_put': False, |
| 47 |
'is_visible': True |
| 48 |
}, |
| 49 |
'subnet_ip_availability': { |
| 50 |
'allow_post': False, 'allow_put': False, |
| 51 |
'is_visible': True |
| 52 |
}, |
| 53 |
# NOTE(hongbin): This 'ip_version' attribute (top-level) is only used |
| 54 |
# as a filter on listing the resources. There is another 'ip_version' |
| 55 |
# attribute nested inside the 'subnet_ip_availability'. |
| 56 |
# The difference is that the top-level attribute is used as input |
| 57 |
# and the nested attribute is an output. |
| 58 |
# In here, 'allow_post', 'allow_put' and 'is_visible' are set to False |
| 59 |
# because this attribute should be used as filter only. Please do not |
| 60 |
# set it to True to avoid introducing inconsistency. |
| 61 |
'ip_version': { |
| 62 |
'allow_post': False, 'allow_put': False, |
| 63 |
'is_visible': False, 'is_filter': True |
| 64 |
} |
| 65 |
# TODO(wwriverrat) Make composite attribute for subnet_ip_availability |
| 66 |
} |
| 67 |
} |
| 68 |
SUB_RESOURCE_ATTRIBUTE_MAP = {} |
| 69 |
ACTION_MAP = {} |
| 70 |
REQUIRED_EXTENSIONS = [] |
| 71 |
OPTIONAL_EXTENSIONS = [] |
| 72 |
ACTION_STATUS = {} |