Move package to swsync.
This commit is contained in:
parent
d58701bbc1
commit
f85bbfaee4
@ -11,9 +11,9 @@ from keystoneclient.v2_0 import client as ksclient
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
from common.utils import get_config
|
||||
from sync.filler import (load_index, load_containers_index,
|
||||
create_swift_account, fill_swift,
|
||||
delete_account_content, delete_account)
|
||||
from swsync.filler import (load_index, load_containers_index,
|
||||
create_swift_account, fill_swift,
|
||||
delete_account_content, delete_account)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -4,8 +4,8 @@ import sys
|
||||
import os
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
import sync.accounts
|
||||
import swsync.accounts
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sync.accounts.main()
|
||||
swsync.accounts.main()
|
||||
|
2
setup.py
2
setup.py
@ -18,7 +18,7 @@
|
||||
|
||||
import setuptools
|
||||
|
||||
from sync.openstack.common import setup
|
||||
from swsync.openstack.common import setup
|
||||
|
||||
name = 'swsync'
|
||||
|
||||
|
@ -22,14 +22,14 @@ import dateutil.relativedelta
|
||||
import keystoneclient.v2_0.client
|
||||
|
||||
from utils import get_config
|
||||
import containers
|
||||
import swsync.containers
|
||||
|
||||
|
||||
class Accounts(object):
|
||||
"""Process Keystone Accounts."""
|
||||
def __init__(self):
|
||||
self.keystone_cnx = None
|
||||
self.container_cls = containers.Containers()
|
||||
self.container_cls = swsync.containers.Containers()
|
||||
|
||||
def get_swift_auth(self, auth_url, tenant, user, password):
|
||||
"""Get swift connexion from args"""
|
@ -17,8 +17,8 @@
|
||||
import swiftclient
|
||||
import eventlet
|
||||
|
||||
from objects import sync_object
|
||||
from utils import get_config
|
||||
from swsync.objects import sync_object
|
||||
from swsync.utils import get_config
|
||||
|
||||
|
||||
class Containers(object):
|
@ -25,8 +25,6 @@
|
||||
# Read pickled index file (index_path) to process a deletion
|
||||
# of objects/containers store in swift for each account then delete
|
||||
# accounts.
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
@ -2,7 +2,6 @@
|
||||
__author__ = "Chmouel Boudjnah <chmouel@chmouel.com>"
|
||||
import os
|
||||
import ConfigParser
|
||||
import swiftclient.client as swclient
|
||||
|
||||
|
||||
CONFIG = {}
|
@ -18,7 +18,7 @@ import swiftclient
|
||||
import keystoneclient
|
||||
|
||||
import base as test_base
|
||||
import sync.accounts
|
||||
import swsync.accounts
|
||||
from fakes import FakeSWConnection, TENANTS_LIST, STORAGE_ORIG, \
|
||||
STORAGE_DEST, FakeSWClient, FakeKS, CONFIGDICT, CONTAINERS_LIST, \
|
||||
fake_get_config
|
||||
@ -27,13 +27,13 @@ from fakes import FakeSWConnection, TENANTS_LIST, STORAGE_ORIG, \
|
||||
class TestAccount(test_base.TestCase):
|
||||
def setUp(self):
|
||||
super(TestAccount, self).setUp()
|
||||
self.accounts_cls = sync.accounts.Accounts()
|
||||
self.accounts_cls = swsync.accounts.Accounts()
|
||||
self._stubs()
|
||||
|
||||
def _stubs(self):
|
||||
self.stubs.Set(keystoneclient.v2_0, 'client', FakeKS)
|
||||
self.stubs.Set(swiftclient.client, 'Connection', FakeSWConnection)
|
||||
self.stubs.Set(sync.accounts, 'get_config', fake_get_config)
|
||||
self.stubs.Set(swsync.accounts, 'get_config', fake_get_config)
|
||||
self.stubs.Set(swiftclient, 'get_account', FakeSWClient.get_account)
|
||||
self.stubs.Set(swiftclient, 'http_connection',
|
||||
FakeSWClient.http_connection)
|
||||
|
@ -18,8 +18,7 @@ import urlparse
|
||||
|
||||
import swiftclient
|
||||
|
||||
import sync.containers
|
||||
import sync.objects
|
||||
import swsync.containers
|
||||
|
||||
import base as test_base
|
||||
from fakes import STORAGE_ORIG, STORAGE_DEST, TENANTS_LIST, \
|
||||
@ -29,7 +28,7 @@ from fakes import STORAGE_ORIG, STORAGE_DEST, TENANTS_LIST, \
|
||||
class TestContainers(test_base.TestCase):
|
||||
def setUp(self):
|
||||
super(TestContainers, self).setUp()
|
||||
self.container_cls = sync.containers.Containers()
|
||||
self.container_cls = swsync.containers.Containers()
|
||||
|
||||
self.tenant_name = 'foo1'
|
||||
self.tenant_id = TENANTS_LIST[self.tenant_name]['id']
|
||||
|
Loading…
x
Reference in New Issue
Block a user