#!/usr/bin/python
+import os
import sys
import copy
from pprint import pformat
os.unlink(path)
-class CerficiateCommands(Commands):
+class CertCommands(Commands):
def import_gid(self, xrn):
pass
@args('-t', '--type', dest='type', metavar='<type>', help='object type', default=None)
@args('-o', '--outfile', dest='outfile', metavar='<outfile>', help='output file', default=None)
def export(self, xrn, type=None, outfile=None):
+ from sfa.storage.alchemy import dbsession
+ from sfa.storage.model import RegRecord
+ hrn = Xrn(xrn).get_hrn()
request=dbsession.query(RegRecord).filter_by(hrn=hrn)
if type: request = request.filter_by(type=type)
record=request.first()
self.api= Generic.the_flavour().make_api(interface='slicemgr')
-CATEGORIES = {'cert': CertificateCommands,
+CATEGORIES = {'cert': CertCommands,
'registry': RegistryCommands,
'aggregate': AggregateCommands,
'slicemgr': SliceManagerCommands}