public DatacenterSyncBusiness(IConfiguration configuration, ILogger <DatacenterSyncBusiness> logger, IDatacenterRepository datacenterRepository)
 {
     ConfigureClient.Initialise(configuration["Proxmox:Uri"], configuration["Proxmox:Token"]);
     this.configuration        = configuration;
     this.logger               = logger;
     this.datacenterRepository = datacenterRepository;
 }
Exemplo n.º 2
0
 public DatacenterService(IDatacenterRepository repository, IAuditEventLogger auditEventLogger, IMapper mapper, IRackRepository rackRepository)
 {
     _repository       = repository;
     _auditEventLogger = auditEventLogger;
     _mapper           = mapper;
     _rackRepository   = rackRepository;
 }
Exemplo n.º 3
0
        public ClusterBusiness(IClusterRepository clusterRepository, IDatacenterRepository datacenterRepository,
                               ISshKeyRepository sshKeyRepository, IClusterNodeRepository clusterNodeRepository,
                               IQueueService queueService, ITemplateRepository templateRepository,
                               IConfiguration configuration, IMetricRepository metricRepository, IMapper mapper, ITraefikRouterService traefikRouterService, IDomainRepository domainNameRepository)
        {
            if (clusterRepository == null)
            {
                throw new ArgumentNullException(nameof(clusterRepository));
            }
            if (datacenterRepository == null)
            {
                throw new ArgumentNullException(nameof(datacenterRepository));
            }
            if (sshKeyRepository == null)
            {
                throw new ArgumentNullException(nameof(sshKeyRepository));
            }
            if (clusterNodeRepository == null)
            {
                throw new ArgumentNullException(nameof(clusterNodeRepository));
            }
            if (queueService == null)
            {
                throw new ArgumentNullException(nameof(queueService));
            }
            if (templateRepository == null)
            {
                throw new ArgumentNullException(nameof(templateRepository));
            }
            if (traefikRouterService == null)
            {
                throw new ArgumentNullException(nameof(traefikRouterService));
            }
            if (metricRepository == null)
            {
                throw new ArgumentNullException(nameof(metricRepository));
            }
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            this.clusterRepository     = clusterRepository;
            this.datacenterRepository  = datacenterRepository;
            this.sshKeyRepository      = sshKeyRepository;
            this.clusterNodeRepository = clusterNodeRepository;
            this.queueService          = queueService;
            this.templateRepository    = templateRepository;
            this.domain               = configuration["Kubernox:Domain"];
            this.metricRepository     = metricRepository;
            this.mapper               = mapper;
            this.traefikRouterService = traefikRouterService;
            this.domainNameRepository = domainNameRepository;
        }
Exemplo n.º 4
0
        public DatacenterBusiness(ILogger <DatacenterBusiness> logger, IDatacenterRepository datacenterRepository, IMapper mapper)
        {
            if (datacenterRepository == null)
            {
                throw new ArgumentNullException(nameof(datacenterRepository));
            }
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }

            this.logger = logger;
            this.datacenterRepository = datacenterRepository;
            this.mapper = mapper;
        }
Exemplo n.º 5
0
 public ClusterBusiness(IClusterRepository clusterRepository, IDatacenterRepository datacenterRepository,
                        ISshKeyRepository sshKeyRepository, IClusterNodeRepository clusterNodeRepository,
                        IQueueService queueService, ITemplateRepository templateRepository,
                        IConfiguration configuration, ITraefikRedisStore traefikCache, IHubContext <AppHub, IAppHub> hubContext)
 {
     this.clusterRepository     = clusterRepository;
     this.datacenterRepository  = datacenterRepository;
     this.sshKeyRepository      = sshKeyRepository;
     this.clusterNodeRepository = clusterNodeRepository;
     this.queueService          = queueService;
     this.templateRepository    = templateRepository;
     this.configuration         = configuration;
     this.traefikCache          = traefikCache;
     this.hubContext            = hubContext;
     ConfigureClient.Initialise(configuration["Proxmox:Uri"], configuration["Proxmox:Token"]);
 }
Exemplo n.º 6
0
        public QueueBusiness(IQueueService queueService, IHubContext <AppHub, IAppHub> hubContext, IClusterRepository clusterRepository, ILogger <QueueBusiness> logger, IDatacenterRepository datacenterRepository)
        {
            if (queueService == null)
            {
                throw new ArgumentNullException(nameof(queueService));
            }

            if (clusterRepository == null)
            {
                throw new ArgumentNullException(nameof(clusterRepository));
            }

            if (datacenterRepository == null)
            {
                throw new ArgumentNullException(nameof(datacenterRepository));
            }

            this.queueService         = queueService;
            this.hubContext           = hubContext;
            this.clusterRepository    = clusterRepository;
            this.logger               = logger;
            this.datacenterRepository = datacenterRepository;
        }
Exemplo n.º 7
0
 public DatacenterBusiness(ILogger <DatacenterBusiness> logger, IDatacenterRepository datacenterRepository, IMapper mapper)
 {
     this.logger = logger;
     this.datacenterRepository = datacenterRepository;
     this.mapper = mapper;
 }