Compare commits
3 Commits
f732578fb5
...
9b132e1db2
Author | SHA1 | Date |
---|---|---|
Tudor Stanciu | 9b132e1db2 | |
Tudor Stanciu | b6f931ca40 | |
Tudor Stanciu | ff69e4964f |
|
@ -59,16 +59,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution
|
|||
ReleaseNotes.xml = ReleaseNotes.xml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F92904AA-DC7A-4FD7-9807-3C5583C26D98}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{1AE7B305-E24D-48A3-A732-91DAAACA39D6}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
solution items\scripts\api\build-amd64.sh = solution items\scripts\api\build-amd64.sh
|
||||
solution items\scripts\api\buildx-arm32.sh = solution items\scripts\api\buildx-arm32.sh
|
||||
solution items\scripts\api\buildx.sh = solution items\scripts\api\buildx.sh
|
||||
solution items\scripts\api\release.sh = solution items\scripts\api\release.sh
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "notes", "notes", "{A28CE618-9D99-491A-8DCF-23D4A19E7750}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
solution items\notes\generic.txt = solution items\notes\generic.txt
|
||||
|
@ -180,8 +170,6 @@ Global
|
|||
{388D632D-8104-45E2-8017-D04848941F29} = {6889D39C-D8DA-4B99-AFC1-F0B6355E73C0}
|
||||
{1EA9EAD7-8896-4756-A2C2-7969E9073FA6} = {43C78941-52E6-4AB8-9170-CC7C006E4784}
|
||||
{3624DFF4-C692-42F8-BDC2-1C2107E6EDC8} = {C04663A1-E0CD-41D6-A8D7-FADDF9DA8302}
|
||||
{F92904AA-DC7A-4FD7-9807-3C5583C26D98} = {C683E36F-A75F-4620-9D4F-2D73EE933AE1}
|
||||
{1AE7B305-E24D-48A3-A732-91DAAACA39D6} = {F92904AA-DC7A-4FD7-9807-3C5583C26D98}
|
||||
{A28CE618-9D99-491A-8DCF-23D4A19E7750} = {C683E36F-A75F-4620-9D4F-2D73EE933AE1}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
|
|
|
@ -4,10 +4,10 @@ Push nuget packages:
|
|||
dotnet pack /*--include-symbols*/
|
||||
|
||||
# Server:
|
||||
dotnet nuget push NetworkResurrector.Server.PublishedLanguage.1.0.3.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
dotnet nuget push NetworkResurrector.Server.Wrapper.1.0.3.3.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
dotnet nuget push NetworkResurrector.Server.PublishedLanguage.1.1.0.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
dotnet nuget push NetworkResurrector.Server.Wrapper.1.1.0.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
|
||||
# Agent
|
||||
dotnet nuget push NetworkResurrector.Agent.PublishedLanguage.1.0.3.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
dotnet nuget push NetworkResurrector.Agent.Wrapper.1.0.3.1.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
dotnet nuget push NetworkResurrector.Agent.PublishedLanguage.1.1.0.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
dotnet nuget push NetworkResurrector.Agent.Wrapper.1.1.0.nupkg -k ****KEY**** -s https://lab.code-rove.com/public-nuget-server/nuget
|
||||
#######################################################################################################################################################
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "Welcome!"
|
||||
|
||||
version="1.0.5"
|
||||
localRegistryPass="*********"
|
||||
|
||||
echo "Create docker image with version $version."
|
||||
docker image build --build-arg APP_VERSION=$version -t "network-resurrector-api:$version" -f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" .
|
||||
|
||||
echo "Tag docker image with registry prefix."
|
||||
docker tag network-resurrector-api:$version alpine-nexus:8500/network-resurrector/network-resurrector-api:$version
|
||||
|
||||
echo "Login to alpine-nexus registry."
|
||||
docker login --username=admin --password=$localRegistryPass alpine-nexus:8500
|
||||
|
||||
echo "Push image alpine-nexus:8500/network-resurrector/network-resurrector-api:$version to registry."
|
||||
docker push alpine-nexus:8500/network-resurrector/network-resurrector-api:$version
|
||||
|
||||
echo "Remove image alpine-nexus:8500/network-resurrector/network-resurrector-api:$version from local machine."
|
||||
docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-api:$version
|
||||
|
||||
echo "DONE!"
|
|
@ -1,32 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "Welcome!"
|
||||
|
||||
version="1.0.1"
|
||||
localRegistryPass="*********"
|
||||
dockerHubRegistryPass="*********"
|
||||
|
||||
echo "Login to dockerhub registry."
|
||||
docker login --username=tstanciu --password=$dockerHubRegistryPass
|
||||
|
||||
echo "Create docker image with version $version and publish it to dockerhub registry."
|
||||
docker buildx build --build-arg APP_VERSION=$version --platform linux/arm/v7 -t "tstanciu/sta-registry:network-resurrector-api-$version-arm32v7" -f "src/api/NetworkResurrector.Api/Docker/arm32/Dockerfile" --push .
|
||||
|
||||
echo "Pull docker image with version $version from dockerhub registry."
|
||||
docker pull tstanciu/sta-registry:network-resurrector-api-$version-arm32v7
|
||||
|
||||
echo "Tag docker image with alpine-nexus registry prefix."
|
||||
docker tag tstanciu/sta-registry:network-resurrector-api-$version-arm32v7 alpine-nexus:8500/network-resurrector/network-resurrector-api:$version-arm32v7
|
||||
|
||||
echo "Login to alpine-nexus registry."
|
||||
docker login --username=admin --password=$localRegistryPass alpine-nexus:8500
|
||||
|
||||
echo "Push image alpine-nexus:8500/network-resurrector/network-resurrector-api:$version-arm32v7 to registry."
|
||||
docker push alpine-nexus:8500/network-resurrector/network-resurrector-api:$version-arm32v7
|
||||
|
||||
echo "Remove docker image tstanciu/sta-registry:network-resurrector-api-$version-arm32v7 from local machine."
|
||||
docker rmi tstanciu/sta-registry:network-resurrector-api-$version-arm32v7
|
||||
|
||||
echo "Remove docker image tstanciu/sta-registry:network-resurrector-api-$version-arm32v7 from local machine."
|
||||
docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-api:$version-arm32v7
|
||||
|
||||
echo "DONE!"
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "Welcome!"
|
||||
|
||||
version="1.0.7"
|
||||
platform="linux/amd64,linux/arm64"
|
||||
localRegistryPass="***********"
|
||||
databaseConnection="Server=#########;Database=#########;uid=#########;Password=#########;MultipleActiveResultSets=true"
|
||||
identityServerBaseAddress="http://<hostname>:<port>/"
|
||||
networkResurrectorServerBaseAddress="http://<hostname>:<port>/"
|
||||
|
||||
echo "Login to alpine-nexus registry."
|
||||
docker login --username=admin --password=$localRegistryPass alpine-nexus:8500
|
||||
|
||||
echo "Create docker image with version $version for platform $platform"
|
||||
docker buildx build \
|
||||
--build-arg APP_VERSION=$version \
|
||||
--build-arg DATABASE_CONNECTION=$databaseConnection \
|
||||
--build-arg IDENTITY_SERVER_BASE_ADDRESS=$identityServerBaseAddress \
|
||||
--build-arg NETWORK_RESURRECTOR_SERVER_BASE_ADDRESS=$networkResurrectorServerBaseAddress \
|
||||
--platform $platform \
|
||||
--output=type=image,push=true,registry.insecure=true \
|
||||
--push \
|
||||
--tag alpine-nexus:8500/network-resurrector/network-resurrector-api:$version \
|
||||
-f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" .
|
||||
|
||||
echo "Done!"
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/sh
|
||||
echo "Welcome!"
|
||||
|
||||
version="1.0.7"
|
||||
oldver="1.0.6"
|
||||
|
||||
echo "Pull docker image network-resurrector-api:$version from registry."
|
||||
docker pull alpine-nexus:8500/network-resurrector/network-resurrector-api:$version
|
||||
|
||||
echo "Stop old container."
|
||||
docker stop network-resurrector-api && docker rm network-resurrector-api
|
||||
|
||||
echo "Run new container."
|
||||
docker run -d --name network-resurrector-api --restart=always -p 5008:80 alpine-nexus:8500/network-resurrector/network-resurrector-api:$version
|
||||
|
||||
echo "Remove old image network-resurrector-api:$oldver."
|
||||
docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-api:$oldver
|
||||
|
||||
echo "Get container logs:"
|
||||
docker logs network-resurrector-api
|
||||
|
||||
echo "DONE!"
|
|
@ -3,8 +3,8 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Description>Network resurrector agent published language nuget package</Description>
|
||||
<PackageProjectUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</PackageProjectUrl>
|
||||
<RepositoryUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</RepositoryUrl>
|
||||
<PackageProjectUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</PackageProjectUrl>
|
||||
<RepositoryUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Description>Network resurrector agent wrapper nuget package</Description>
|
||||
<PackageProjectUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</PackageProjectUrl>
|
||||
<PackageProjectUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</PackageProjectUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<RepositoryUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</RepositoryUrl>
|
||||
<Version>1.0.3.1</Version>
|
||||
<RepositoryUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</RepositoryUrl>
|
||||
<Version>1.1.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -14,8 +14,8 @@
|
|||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Net.Http.Headers" Version="2.2.8" />
|
||||
<PackageReference Include="NDB.Extensions.Http" Version="1.0.0" />
|
||||
<PackageReference Include="NetworkResurrector.Agent.PublishedLanguage" Version="1.0.3" />
|
||||
<PackageReference Include="Netmash.Extensions.Http" Version="1.0.0" />
|
||||
<PackageReference Include="NetworkResurrector.Agent.PublishedLanguage" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using NDB.Extensions.Http;
|
||||
using Netmash.Extensions.Http;
|
||||
using NetworkResurrector.Agent.PublishedLanguage.Commands;
|
||||
using NetworkResurrector.Agent.PublishedLanguage.Dto;
|
||||
using NetworkResurrector.Agent.PublishedLanguage.Events;
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" />
|
||||
<PackageReference Include="NBB.Messaging.Abstractions" Version="$(NBBPackageVersion)" />
|
||||
<PackageReference Include="NetworkResurrector.Agent.Wrapper" Version="1.0.3.1" />
|
||||
<PackageReference Include="NetworkResurrector.Server.Wrapper" Version="1.0.3.3" />
|
||||
<PackageReference Include="NetworkResurrector.Agent.Wrapper" Version="1.1.0" />
|
||||
<PackageReference Include="NetworkResurrector.Server.Wrapper" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build
|
||||
WORKDIR /src
|
||||
COPY dependencies.props .
|
||||
COPY Directory.Build.props .
|
||||
COPY NuGet.config .
|
||||
COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "NetworkResurrector.Api/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "NetworkResurrector.Api.Application/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj", "NetworkResurrector.Api.PublishedLanguage/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "NetworkResurrector.Api.Domain/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "NetworkResurrector.Api.Domain.Data/"]
|
||||
RUN dotnet restore "NetworkResurrector.Api/NetworkResurrector.Api.csproj"
|
||||
COPY src/api .
|
||||
WORKDIR "/src/NetworkResurrector.Api"
|
||||
RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "NetworkResurrector.Api.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
ENV urls="http://*:80"
|
||||
ENV TZ=Europe/Bucharest
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
ARG APP_VERSION=0.0.0.0
|
||||
ENV APP_VERSION=${APP_VERSION}
|
||||
ARG DATABASE_CONNECTION=""
|
||||
ENV ConnectionStrings__DatabaseConnection=${DATABASE_CONNECTION}
|
||||
ARG IDENTITY_SERVER_BASE_ADDRESS=""
|
||||
ENV IdentityServer__BaseAddress=${IDENTITY_SERVER_BASE_ADDRESS}
|
||||
ARG NETWORK_RESURRECTOR_SERVER_BASE_ADDRESS=""
|
||||
ENV NetworkResurrectorServer__BaseAddress=${NETWORK_RESURRECTOR_SERVER_BASE_ADDRESS}
|
||||
|
||||
#Workaround to lower the TLS level in container for old sql server version
|
||||
RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf
|
||||
|
||||
ENTRYPOINT ["dotnet", "NetworkResurrector.Api.dll", "--console"]
|
|
@ -1,42 +0,0 @@
|
|||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim-arm64v8 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim-arm64v8 AS build
|
||||
WORKDIR /src
|
||||
COPY dependencies.props .
|
||||
COPY Directory.Build.props .
|
||||
COPY NuGet.config .
|
||||
COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "NetworkResurrector.Api/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "NetworkResurrector.Api.Application/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj", "NetworkResurrector.Api.PublishedLanguage/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "NetworkResurrector.Api.Domain/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "NetworkResurrector.Api.Domain.Data/"]
|
||||
RUN dotnet restore "NetworkResurrector.Api/NetworkResurrector.Api.csproj"
|
||||
COPY src/api .
|
||||
WORKDIR "/src/NetworkResurrector.Api"
|
||||
RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "NetworkResurrector.Api.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
ENV urls="http://*:80"
|
||||
ENV ConnectionStrings__DatabaseConnection="*********"
|
||||
ENV IdentityServer__BaseAddress="*********"
|
||||
ENV NetworkResurrectorServer__BaseAddress="*********"
|
||||
ENV TZ=Europe/Bucharest
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
ARG APP_VERSION=0.0.0.0
|
||||
ENV APP_VERSION=${APP_VERSION}
|
||||
|
||||
#Workaround to lower the TLS level in container for old sql server version
|
||||
RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf
|
||||
|
||||
ENTRYPOINT ["dotnet", "NetworkResurrector.Api.dll", "--console"]
|
|
@ -1,10 +1,10 @@
|
|||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim-arm32v7 AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim-arm32v7 AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build
|
||||
WORKDIR /src
|
||||
COPY dependencies.props .
|
||||
COPY Directory.Build.props .
|
||||
|
@ -26,10 +26,8 @@ FROM base AS final
|
|||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
ENV urls="http://*:80"
|
||||
ENV ConnectionStrings__DatabaseConnection="*********"
|
||||
ENV IdentityServer__BaseAddress="*********"
|
||||
ENV NetworkResurrectorServer__BaseAddress="*********"
|
||||
ENV AUTHOR="Tudor Stanciu"
|
||||
ENV Urls="http://*:80"
|
||||
ENV TZ=Europe/Bucharest
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
|
@ -39,4 +37,4 @@ ENV APP_VERSION=${APP_VERSION}
|
|||
#Workaround to lower the TLS level in container for old sql server version
|
||||
RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf
|
||||
|
||||
ENTRYPOINT ["dotnet", "NetworkResurrector.Api.dll", "--console"]
|
||||
ENTRYPOINT ["dotnet", "NetworkResurrector.Api.dll"]
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"urls": "http://*:5064",
|
||||
"Urls": "http://*:5064",
|
||||
"ConnectionStrings": {
|
||||
"DatabaseConnection": "Server=#########;Database=#########;User Id=#########;Password=#########;MultipleActiveResultSets=true"
|
||||
},
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Description>Network resurrector server published language nuget package</Description>
|
||||
<RepositoryUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</RepositoryUrl>
|
||||
<RepositoryUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageProjectUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</PackageProjectUrl>
|
||||
<Version>1.0.3</Version>
|
||||
<PackageProjectUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</PackageProjectUrl>
|
||||
<Version>1.1.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Description>Network resurrector server wrapper nuget package</Description>
|
||||
<PackageProjectUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</PackageProjectUrl>
|
||||
<RepositoryUrl>https://dev.azure.com/tstanciu94/NetworkResurrector</RepositoryUrl>
|
||||
<PackageProjectUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</PackageProjectUrl>
|
||||
<RepositoryUrl>https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<Version>1.0.3.3</Version>
|
||||
<Version>1.1.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -14,8 +14,8 @@
|
|||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Net.Http.Headers" Version="2.2.8" />
|
||||
<PackageReference Include="NDB.Extensions.Http" Version="1.0.0" />
|
||||
<PackageReference Include="NetworkResurrector.Server.PublishedLanguage" Version="1.0.3" />
|
||||
<PackageReference Include="Netmash.Extensions.Http" Version="1.0.0" />
|
||||
<PackageReference Include="NetworkResurrector.Server.PublishedLanguage" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using NDB.Extensions.Http;
|
||||
using Netmash.Extensions.Http;
|
||||
using NetworkResurrector.Server.PublishedLanguage.Commands;
|
||||
using NetworkResurrector.Server.PublishedLanguage.Events;
|
||||
using NetworkResurrector.Server.Wrapper.Constants;
|
||||
|
@ -31,21 +31,21 @@ namespace NetworkResurrector.Server.Wrapper.Services
|
|||
|
||||
public async Task<MachineWaked> Wake(string macAddress)
|
||||
{
|
||||
var body = new WakeMachine(macAddress);
|
||||
var body = new WakeMachine() { MacAddress = macAddress };
|
||||
var result = await _httpClient.ExecutePostRequest<MachineWaked, WakeMachine>(ApiRoutes.Wake, body);
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<MachinePinged> Ping(string ipAddressOrMachineName)
|
||||
{
|
||||
var body = new PingMachine(ipAddressOrMachineName);
|
||||
var body = new PingMachine() { IpAddressOrMachineName = ipAddressOrMachineName };
|
||||
var result = await _httpClient.ExecutePostRequest<MachinePinged, PingMachine>(ApiRoutes.Ping, body);
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<MachineShutdown> Shutdown(string ipAddressOrMachineName)
|
||||
{
|
||||
var body = new ShutdownMachine(ipAddressOrMachineName);
|
||||
var body = new ShutdownMachine() { IPAddressOrMachineName = ipAddressOrMachineName };
|
||||
var result = await _httpClient.ExecutePostRequest<MachineShutdown, ShutdownMachine>(ApiRoutes.Shutdown, body);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue