]
returns = Parameter(int, 'New interface_id (> 0) if successful')
-
+
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
def call(self, auth, node_id_or_hostname, interface_fields):
returns = Parameter(int, 'New node_id (> 0) if successful')
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
+
def call(self, auth, site_id_or_login_base, node_fields):
[native,tags,rejected]=Row.split_fields(node_fields,[legacy_node_fields,Node.tags])
returns = Parameter(int, '1 if successful')
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
def call(self, auth, interface_id):
returns = Parameter(int, '1 if successful')
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
+
def call(self, auth, node_id_or_hostname):
# Get account information
nodes = Nodes(self.api, [node_id_or_hostname])
returns = [Interface.fields] + ["type", "ip", "netmask", "network", "broadcast"]
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
+
def call(self, auth, interface_filter = None, return_fields = None):
if (return_fields is not None):
interface_return_fields = return_fields[:]
returns = [legacy_node_fields]
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
def call(self, auth, node_filter = None, return_fields = None):
returns = Parameter(int, '1 if successful')
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
+
def call(self, auth, interface_id, interface_fields):
[native,tags,rejected] = Row.split_fields(interface_fields,[legacy_interface_fields,Interface.tags])
returns = Parameter(int, '1 if successful')
+ # needed for generating the doc and prevent conflicts in the xml ids
+ status = 'legacy'
+
def call(self, auth, node_id_or_hostname, node_fields):
# split provided fields
def Process (self):
for func in self.functions_list:
- method = func.name
if func.status == "deprecated":
continue
+ method = func.name
+ if func.status == 'legacy':
+ method += "-legacy"
+
(min_args, max_args, defaults) = func.args()
section = Element('section')
- section.setAttribute('id', func.name)
- section.appendChild(simpleElement('title', func.name))
+ section.setAttribute('id', method)
+ section.appendChild(simpleElement('title', method))
prototype = "%s (%s)" % (method, ", ".join(max_args))
para = paraElement('Prototype:')