Skip to content

Commit 4b3e266

Browse files
committed
Add node to IP_Network
1 parent ca7c1a0 commit 4b3e266

File tree

3 files changed

+1791
-675
lines changed

3 files changed

+1791
-675
lines changed

Diff for: _FFM/IP_Network.py

+29-9
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
# change `has_children` to `Attr.Query`
5656
# 13-Jun-2014 (RS) Rename `cool_down` to `expiration_date`
5757
# Add ui_name for `desc`
58+
# 14-Jun-2014 (RS) Add `node`
5859
# ««revision-date»»···
5960
#--
6061

@@ -71,6 +72,8 @@
7172

7273
import _GTW._OMP._NET.Attr_Type
7374

75+
#Int_Interval = A_Int_Interval = MOM.Attr.Number_Interval.make (A_Int)
76+
7477
_Ancestor_Essence = FFM.Object
7578

7679
class IP_Network (_Ancestor_Essence) :
@@ -152,15 +155,6 @@ class desc (A_String) :
152155

153156
# end class desc
154157

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-
164158
class expiration_date (A_Date_Time) :
165159
"""Cool down date after which the IP_Network is free to be
166160
reallocated.
@@ -183,6 +177,32 @@ class has_children (A_Boolean) :
183177

184178
# end class has_children
185179

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+
186206
class owner (A_Id_Entity) :
187207
"""Owner of the `%(type_name)s`."""
188208

0 commit comments

Comments
 (0)