internal PSPoolInformation(Microsoft.Azure.Batch.PoolInformation omObject)
 {
     if ((omObject == null))
     {
         throw new System.ArgumentNullException("omObject");
     }
     this.omObject = omObject;
 }
示例#2
0
 internal PSPoolInformation(Microsoft.Azure.Batch.PoolInformation omObject)
 {
     if ((omObject == null))
     {
         throw new System.ArgumentNullException("omObject");
     }
     this.omObject = omObject;
 }
        public void CreateJobWithApplicationReferencesTest()
        {
            const string applicationId = "blender.exe";
            const string version       = "blender";
            const string jobId         = "mock-job";

            BatchSharedKeyCredentials credentials = ClientUnitTestCommon.CreateDummySharedKeyCredential();

            using (BatchClient client = BatchClient.Open(credentials))
            {
                Microsoft.Azure.Batch.PoolInformation autoPoolSpecification = new Microsoft.Azure.Batch.PoolInformation
                {
                    AutoPoolSpecification = new Microsoft.Azure.Batch.AutoPoolSpecification
                    {
                        KeepAlive         = false,
                        PoolSpecification = new Microsoft.Azure.Batch.PoolSpecification
                        {
                            ApplicationPackageReferences = new List <Microsoft.Azure.Batch.ApplicationPackageReference>
                            {
                                new Microsoft.Azure.Batch.ApplicationPackageReference
                                {
                                    ApplicationId = applicationId,
                                    Version       = version
                                }
                            },
                            AutoScaleEnabled = false
                        }
                    }
                };

                Microsoft.Azure.Batch.CloudJob cloudJob = client.JobOperations.CreateJob(jobId, autoPoolSpecification);

                Assert.Equal(cloudJob.PoolInformation.AutoPoolSpecification.PoolSpecification.ApplicationPackageReferences.First().ApplicationId, applicationId);
                Assert.Equal(cloudJob.PoolInformation.AutoPoolSpecification.PoolSpecification.ApplicationPackageReferences.First().Version, version);
            }
        }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JobSpecification"/> class.
 /// </summary>
 /// <param name='poolInformation'>The pool on which the Batch service runs the tasks of jobs created via this <see cref="JobSpecification"/>.</param>
 public JobSpecification(
     PoolInformation poolInformation)
 {
     this.propertyContainer = new PropertyContainer();
     this.PoolInformation   = poolInformation;
 }
示例#5
0
 public PSPoolInformation()
 {
     this.omObject = new Microsoft.Azure.Batch.PoolInformation();
 }
 public PSPoolInformation()
 {
     this.omObject = new Microsoft.Azure.Batch.PoolInformation();
 }