Esempio n. 1
0
 public Quickstart(
     IBootstrapper bootstrapper,
     Option <RegistryCredentials> credentials,
     string iothubConnectionString,
     string eventhubCompatibleEndpointWithEntityPath,
     UpstreamProtocolType upstreamProtocol,
     Option <string> proxy,
     string imageTag,
     string deviceId,
     string hostname,
     LeaveRunning leaveRunning,
     bool noVerify,
     bool bypassEdgeInstallation,
     string verifyDataFromModule,
     Option <string> deploymentFileName,
     Option <string> twinTestFileName,
     string deviceCaCert,
     string deviceCaPk,
     string deviceCaCerts,
     bool optimizedForPerformance,
     LogLevel runtimeLogLevel,
     bool cleanUpExistingDeviceOnSuccess,
     Option <DPSAttestation> dpsAttestation)
     : base(bootstrapper, credentials, iothubConnectionString, eventhubCompatibleEndpointWithEntityPath, upstreamProtocol, proxy, imageTag, deviceId, hostname, deploymentFileName, twinTestFileName, deviceCaCert, deviceCaPk, deviceCaCerts, optimizedForPerformance, runtimeLogLevel, cleanUpExistingDeviceOnSuccess, dpsAttestation)
 {
     this.leaveRunning           = leaveRunning;
     this.noVerify               = noVerify;
     this.bypassEdgeInstallation = bypassEdgeInstallation;
     this.verifyDataFromModule   = verifyDataFromModule;
     this.dpsProvisionTest       = dpsAttestation.HasValue;
 }
Esempio n. 2
0
 public Quickstart(
     IBootstrapper bootstrapper,
     Option <RegistryCredentials> credentials,
     string iothubConnectionString,
     string eventhubCompatibleEndpointWithEntityPath,
     UpstreamProtocolType upstreamProtocol,
     string imageTag,
     string deviceId,
     string hostname,
     LeaveRunning leaveRunning,
     bool noDeployment,
     bool noVerify,
     string verifyDataFromModule,
     Option <string> deploymentFileName,
     string deviceCaCert,
     string deviceCaPk,
     string deviceCaCerts,
     bool optimizedForPerformance,
     LogLevel runtimeLogLevel,
     bool cleanUpExistingDeviceOnSuccess) :
     base(bootstrapper, credentials, iothubConnectionString, eventhubCompatibleEndpointWithEntityPath, upstreamProtocol, imageTag, deviceId, hostname, deploymentFileName, deviceCaCert, deviceCaPk, deviceCaCerts, optimizedForPerformance, runtimeLogLevel, cleanUpExistingDeviceOnSuccess)
 {
     this.leaveRunning         = leaveRunning;
     this.noDeployment         = noDeployment;
     this.noVerify             = noVerify;
     this.verifyDataFromModule = verifyDataFromModule;
 }
Esempio n. 3
0
        protected Details(
            IBootstrapper bootstrapper,
            Option <RegistryCredentials> credentials,
            string iothubConnectionString,
            string eventhubCompatibleEndpointWithEntityPath,
            UpstreamProtocolType upstreamProtocol,
            Option <string> proxy,
            string imageTag,
            string deviceId,
            string hostname,
            Option <string> deploymentFileName,
            Option <string> twinTestFileName,
            string deviceCaCert,
            string deviceCaPk,
            string deviceCaCerts,
            bool optimizedForPerformance,
            bool initializeWithAgentArtifact,
            LogLevel runtimeLogLevel,
            bool cleanUpExistingDeviceOnSuccess,
            Option <DPSAttestation> dpsAttestation)
        {
            this.bootstrapper           = bootstrapper;
            this.credentials            = credentials;
            this.iothubConnectionString = iothubConnectionString;
            this.dpsAttestation         = dpsAttestation;
            this.eventhubCompatibleEndpointWithEntityPath = eventhubCompatibleEndpointWithEntityPath;

            switch (upstreamProtocol)
            {
            case UpstreamProtocolType.Amqp:
            case UpstreamProtocolType.Mqtt:
                this.serviceClientTransportType  = ServiceClientTransportType.Amqp;
                this.eventHubClientTransportType = EventHubClientTransportType.Amqp;
                break;

            case UpstreamProtocolType.AmqpWs:
            case UpstreamProtocolType.MqttWs:
                this.serviceClientTransportType  = ServiceClientTransportType.Amqp_WebSocket_Only;
                this.eventHubClientTransportType = EventHubClientTransportType.AmqpWebSockets;
                break;

            default:
                throw new Exception($"Unexpected upstream protocol type {upstreamProtocol}");
            }

            this.imageTag                       = imageTag;
            this.deviceId                       = deviceId;
            this.hostname                       = hostname;
            this.DeploymentFileName             = deploymentFileName;
            this.TwinTestFileName               = twinTestFileName;
            this.deviceCaCert                   = deviceCaCert;
            this.deviceCaPk                     = deviceCaPk;
            this.deviceCaCerts                  = deviceCaCerts;
            this.optimizedForPerformance        = optimizedForPerformance;
            this.initializeWithAgentArtifact    = initializeWithAgentArtifact;
            this.runtimeLogLevel                = runtimeLogLevel;
            this.cleanUpExistingDeviceOnSuccess = cleanUpExistingDeviceOnSuccess;
            this.proxy = proxy.Map(p => new WebProxy(p) as IWebProxy);
        }