55
55
# change `has_children` to `Attr.Query`
56
56
# 13-Jun-2014 (RS) Rename `cool_down` to `expiration_date`
57
57
# Add ui_name for `desc`
58
+ # 14-Jun-2014 (RS) Add `node`
58
59
# ««revision-date»»···
59
60
#--
60
61
71
72
72
73
import _GTW ._OMP ._NET .Attr_Type
73
74
75
+ #Int_Interval = A_Int_Interval = MOM.Attr.Number_Interval.make (A_Int)
76
+
74
77
_Ancestor_Essence = FFM .Object
75
78
76
79
class IP_Network (_Ancestor_Essence ) :
@@ -152,15 +155,6 @@ class desc (A_String) :
152
155
153
156
# end class desc
154
157
155
- class is_free (A_Boolean ) :
156
- """Indicates whether this `%(type_name)s` can be assigned"""
157
-
158
- kind = Attr .Query
159
- query = Q .NOT \
160
- (Q .has_children | Q .expiration_date | Q .net_interface_links )
161
-
162
- # end class is_free
163
-
164
158
class expiration_date (A_Date_Time ) :
165
159
"""Cool down date after which the IP_Network is free to be
166
160
reallocated.
@@ -183,6 +177,32 @@ class has_children (A_Boolean) :
183
177
184
178
# end class has_children
185
179
180
+ class is_free (A_Boolean ) :
181
+ """Indicates whether this `%(type_name)s` can be assigned"""
182
+
183
+ kind = Attr .Query
184
+ query = Q .NOT \
185
+ (Q .has_children | Q .expiration_date | Q .net_interface_links )
186
+
187
+ # end class is_free
188
+
189
+ # FIXME: Ugly Traceback
190
+ # class netmask_range (A_Int_Interval) :
191
+ # """Limit range of netmasks to allocate from this %(type_name)s."""
192
+ #
193
+ # kind = Attr.Optional
194
+ #
195
+ # # end class netmask_range
196
+
197
+ class node (A_Id_Entity ) :
198
+ """Node for which this `%(type_name)s` is reserved."""
199
+
200
+ kind = Attr .Optional
201
+ P_Type = FFM .Node
202
+ ui_allow_new = False
203
+
204
+ # end class node
205
+
186
206
class owner (A_Id_Entity ) :
187
207
"""Owner of the `%(type_name)s`."""
188
208
0 commit comments