Пример #1
0
class Importer:
    def __init__(self, username, password, url):
        api = API(username, password, url)
        self.sites = SiteImporter(api)
        self.slices = SliceImporter(api)
        self.users = UserImporter(api)
        self.slivers = SliverImporter(api)

    def run(self):
        self.sites.run()
        self.users.run()
        self.slices.run(remote_sites=self.sites.remote_sites,
                        local_sites=self.sites.local_sites)
        self.slivers.run()
Пример #2
0
class Importer: 

    def __init__(self, username, password, url):
        api = API(username, password, url)
        self.sites = SiteImporter(api)
        self.slices = SliceImporter(api)
        self.users = UserImporter(api)
        self.slivers = SliverImporter(api)

    def run(self):
        self.sites.run()
        self.users.run()
        self.slices.run(remote_sites=self.sites.remote_sites, 
                        local_sites=self.sites.local_sites)
        self.slivers.run()           
Пример #3
0
 def __init__(self, username, password, url):
     api = API(username, password, url)
     self.sites = SiteImporter(api)
     self.slices = SliceImporter(api)
     self.users = UserImporter(api)
     self.slivers = SliverImporter(api)
Пример #4
0
 def __init__(self, username, password, url):
     api = API(username, password, url)
     self.sites = SiteImporter(api)
     self.slices = SliceImporter(api)
     self.users = UserImporter(api)
     self.slivers = SliverImporter(api)