Example #1
0
        private List <DeploymentModel> ParseDeploymentModel(List <AzureSphereDeployment> deployments)
        {
            List <DeploymentModel> deploymentsModels = new List <DeploymentModel>();

            foreach (AzureSphereDeployment deployment in deployments)
            {
                DeploymentModel model = new DeploymentModel();

                model.Context = deployment;
                model.CurrentDeploymentDate = deployment.DeploymentDateUtc.ToLocalTime();
                model.NumberOfImages        = deployment.DeployedImages.Count;
                deploymentsModels.Add(model);
            }
            return(deploymentsModels);
        }
Example #2
0
        // Image list
        public async Task <List <ImageModel> > GetImageModels(TenantModel tenantModel, DeploymentModel deploymentModel)
        {
            List <ImageModel> imageModels;

            try
            {
                imageModels = await GetImagesAsync(tenantModel.Context, deploymentModel.Context);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.ToString());
                return(null);
            }
            return(imageModels);
        }