else:
return name+'s'
+ def singular(self):
+ return str(self)
+
+ def rest_name(self):
+ # These are things that either for historic reasons or due to incorrect naming,
+ # got called something different than the autogen thinks they should be
+ # called.
+ REST_FIXUP = {'networkdeploymentses': 'networkdeployments',
+ 'imagedeploymentses': 'imagedeployments',
+ 'slicedeploymentses': 'slicedeployments',
+ 'userdeploymentses': 'userdeployments',
+ 'sitedeploymentses': 'sitedeployments',
+ 'siteroles': 'site_roles',
+ 'sliceprivileges': 'slice_privileges',
+ 'sliceroles': 'slice_roles',
+ }
+ return REST_FIXUP.get(self.plural(), self.plural())
+
def camel(self):
name = str(self.model.__name__)
return name
cobj = copy.deepcopy(obj)
cobj.multi=True
refobj.refs.append(cobj)
-
+
+ # deal with upgradeFrom_rel_+
+ if (related_name.endswith("+")):
+ continue
+
if (related_name!='+' and related_name.lower()!=str(obj).lower()):
cobj = copy.deepcopy(obj)
cobj.multi = True