示例#1
0
        private static GenericProductJobRunner CreateJobRunner()
        {
            const string prefix = "inspec";
            var          downloadUrlResolver = new ChefDownloadUrlResolver(prefix, prefix, "2012");
            var          productName         = prefix;

            var commands   = new FileSystemCommandsBoundary();
            var fileSystem = new FileSystem(new EnvironmentBoundary(), commands);

            return(new GenericProductJobRunner(StructureMapResolver.Container.GetInstance <JobRunner>(),
                                               CreateDownloadJob(fileSystem, productName, downloadUrlResolver),
                                               CreateInstallJob(productName, fileSystem, commands, InstalledProductsFinder.IsInspec,
                                                                downloadUrlResolver)));
        }
示例#2
0
        private static ChefJobRunner CreateChefJobRunner()
        {
            var          commands   = new FileSystemCommandsBoundary();
            var          fileSystem = new FileSystem(new EnvironmentBoundary(), commands);
            const string prefix     = "chef-client";
            var          product    = "chef";

            var chefDownloadUrlResolver = new ChefDownloadUrlResolver(product, prefix, "2012r2");

            return(new ChefJobRunner(StructureMapResolver.Container.GetInstance <JobRunner>(),
                                     InspecController.CreateDownloadJob(fileSystem, product, chefDownloadUrlResolver),
                                     InspecController.CreateInstallJob(product, fileSystem, commands, InstalledProductsFinder.IsChefClient,
                                                                       chefDownloadUrlResolver),
                                     StructureMapResolver.Container.GetInstance <RunChefJob>()));
        }