Ejemplo n.º 1
0
        public async Task <Versions> ListActiveGateAvailableVersionsAsync(WindowsUnixDeploymentOsTypes osType, CancellationToken cancellationToken = default)
        {
            var response = await GetDeploymentActiveGateUrl()
                           .AppendPathSegment("versions")
                           .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType))
                           .GetJsonWithErrorCheckingAsync <Versions>(cancellationToken)
                           .ConfigureAwait(false);

            return(response);
        }
Ejemplo n.º 2
0
        public async Task <bool> DownloadActiveGateLatestAsync(WindowsUnixDeploymentOsTypes osType, string ifNoneMatchEtag = null, CancellationToken cancellationToken = default)
        {
            var response = await GetDeploymentActiveGateUrl()
                           .WithHeader("If-None-Match", ifNoneMatchEtag)
                           .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType))
                           .AppendPathSegment("latest")
                           .GetAsync(cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
Ejemplo n.º 3
0
        public async Task <bool> DownloadBoshTarballsSpecificVersionAsync(WindowsUnixDeploymentOsTypes osType, string version, bool?skipMetadata = false, CancellationToken cancellationToken = default)
        {
            var response = await GetDeploymentBoshReleaseUrl()
                           .AppendPathSegment("agent")
                           .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType))
                           .AppendPathSegment("version")
                           .AppendPathSegment(version)
                           .SetQueryParam(nameof(skipMetadata), skipMetadata)
                           .GetAsync(cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
Ejemplo n.º 4
0
        public async Task <BoshReleaseChecksum> GetBoshTarballChecksumAsync(WindowsUnixDeploymentOsTypes osType, string version, bool?skipMetadata = false, CancellationToken cancellationToken = default)
        {
            var response = await GetDeploymentBoshReleaseUrl()
                           .AppendPathSegment("agent")
                           .AppendPathSegment(s_deploymentOsTypesConverter.ConvertToString(osType))
                           .AppendPathSegment("version")
                           .AppendPathSegment(version)
                           .AppendPathSegment("checksum")
                           .SetQueryParam(nameof(skipMetadata), skipMetadata)
                           .GetJsonWithErrorCheckingAsync <BoshReleaseChecksum>(cancellationToken)
                           .ConfigureAwait(false);

            return(response);
        }