# Remove all related entities
for obj in \
- Slices(self.api, self['slice_ids'], peer_id = self['peer_id']) + \
- Keys(self.api, self['key_ids'], peer_id = self['peer_id']) + \
- Persons(self.api, self['person_ids'], peer_id = self['peer_id']) + \
- Nodes(self.api, self['node_ids'], peer_id = self['peer_id']) + \
- Sites(self.api, self['site_ids'], peer_id = self['peer_id']):
+ Slices(self.api, self['slice_ids']) + \
+ Keys(self.api, self['key_ids']) + \
+ Persons(self.api, self['person_ids']) + \
+ Nodes(self.api, self['node_ids']) + \
+ Sites(self.api, self['site_ids']):
assert obj['peer_id'] == self['peer_id']
obj.delete(commit = False)
'peer_node_id': peer_node_id},
commit = commit)
- def add_slice_attribute_type(self, slice_attribute_type, peer_attribute_type_id, commit = True):
- """
- Associate a local slice attribute type entry with this peer.
- """
-
- add = Row.add_object(SliceAttributeType, 'peer_slice_attribute_type')
- add(self, slice_attribute_type,
- {'peer_id': self['peer_id'],
- 'attribute_type_id': slice_attribute_type['attribute_type_id'],
- 'peer_attribute_type_id': peer_attribute_type_id},
- commit = commit)
-
- def add_slice_attribute(self, slice_attribute, peer_slice_attribute_id, commit = True):
- """
- Associate a local slice_attribute entry with this peer.
- """
-
- add = Row.add_object(SliceAttribute, 'peer_slice_attribute')
- add(self, slice_attribute,
- {'peer_id': self['peer_id'],
- 'slice_attribute_id': slice_attribute['slice_attribute_id'],
- 'peer_slice_attribute_id': peer_slice_attribute_id},
- commit = commit)
-
def add_slice(self, slice, peer_slice_id, commit = True):
"""
Associate a local slice entry with this peer.
def wrapper(*args, **kwds):
from PLC.GPG import gpg_sign
- signature = gpg_sign(methodname, args,
+ signature = gpg_sign(args,
self.api.config.PLC_ROOT_GPG_KEY,
- self.api.config.PLC_ROOT_GPG_KEY_PUB)
+ self.api.config.PLC_ROOT_GPG_KEY_PUB,
+ methodname)
auth = {'AuthMethod': "gpg",
'name': self.api.config.PLC_NAME,