def get_manager() -> 'PackageManager': """ Creates and returns PackageManager instance. Returns: PackageManager """ docker_api = DockerApi(docker.from_env()) registry_resolver = RegistryResolver() return PackageManager( DockerApi(docker.from_env(), ProgressManager()), registry_resolver, PackageDatabase.from_file(), MetadataResolver(docker_api, registry_resolver), ServiceCreator(FeatureRegistry(SonicDB), SonicDB), device_info, filelock.FileLock(PACKAGE_MANAGER_LOCK_FILE, timeout=0))
def get_manager() -> 'PackageManager': """ Creates and returns PackageManager instance. Returns: PackageManager """ docker_api = DockerApi(docker.from_env(), ProgressManager()) registry_resolver = RegistryResolver() metadata_resolver = MetadataResolver(docker_api, registry_resolver) cfg_mgmt = config_mgmt.ConfigMgmt(source=INIT_CFG_JSON) cli_generator = CliGenerator(log) feature_registry = FeatureRegistry(SonicDB) service_creator = ServiceCreator(feature_registry, SonicDB, cli_generator, cfg_mgmt) return PackageManager( docker_api, registry_resolver, PackageDatabase.from_file(), metadata_resolver, service_creator, device_info, filelock.FileLock(PACKAGE_MANAGER_LOCK_FILE, timeout=0))