This commit is contained in:
Родитель
9f2789bf64
Коммит
2854fa45ed
|
@ -49,7 +49,9 @@ See Also:
|
|||
{
|
||||
public const string CommandName = "new-cfg";
|
||||
|
||||
[Option("-T|--target <target>", Description = "Sets the configuration target (one of: ‘Docker’, ‘Kubernetes’, ‘Cloud-Foundry’); default is 'Docker'")]
|
||||
[Option("-T|--target <target>",
|
||||
Description =
|
||||
"Sets the configuration target (one of: ‘Docker’, ‘Kubernetes’, ‘Cloud-Foundry’); default is 'Docker'")]
|
||||
private string Target { get; set; } = "Docker";
|
||||
|
||||
[Option("-n|--name <cfgname>", Description = "Sets the configuration name; default is the project name")]
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
// limitations under the License.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using McMaster.Extensions.CommandLineUtils;
|
||||
using Steeltoe.Tooling.Executors;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace Steeltoe.Tooling
|
|||
|
||||
return result.Out;
|
||||
}
|
||||
|
||||
|
||||
private static void OutputToConsole(string output)
|
||||
{
|
||||
if (!Settings.VerboseEnabled) return;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Steeltoe.Tooling.Drivers.CloudFoundry
|
||||
{
|
||||
|
|
|
@ -34,7 +34,8 @@ namespace Steeltoe.Tooling.Drivers.Kubernetes
|
|||
/// <summary>
|
||||
/// Resource name.
|
||||
/// </summary>
|
||||
[YamlMember(Alias = "name")] public string Name { get; set; }
|
||||
[YamlMember(Alias = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Resource labels, e.g. "tier" -> "frontend".
|
||||
|
@ -51,17 +52,20 @@ namespace Steeltoe.Tooling.Drivers.Kubernetes
|
|||
/// <summary>
|
||||
/// Service port.
|
||||
/// </summary>
|
||||
[YamlMember(Alias = "port")] public int Port { get; set; }
|
||||
[YamlMember(Alias = "port")]
|
||||
public int Port { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Service target port.
|
||||
/// </summary>
|
||||
[YamlMember(Alias = "targetPort")] public int TargetPort { get; set; }
|
||||
[YamlMember(Alias = "targetPort")]
|
||||
public int TargetPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Service container port.
|
||||
/// </summary>
|
||||
[YamlMember(Alias = "containerPort")] public int ContainerPort { get; set; }
|
||||
[YamlMember(Alias = "containerPort")]
|
||||
public int ContainerPort { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using System.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Steeltoe.Tooling.Drivers.Kubernetes
|
||||
{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Steeltoe.Tooling.Drivers.Kubernetes
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using System.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Steeltoe.Tooling.Drivers.Kubernetes
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Steeltoe.Tooling
|
|||
/// Service description.
|
||||
/// </summary>
|
||||
[YamlMember(Alias = "description")]
|
||||
public string Description { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a human-readable representation of this ServiceTypeInfo.
|
||||
|
|
|
@ -25,12 +25,14 @@ namespace Steeltoe.Tooling
|
|||
/// <summary>
|
||||
/// Deployment target name.
|
||||
/// </summary>
|
||||
[YamlMember(Alias = "name")] public string Name { get; set; }
|
||||
[YamlMember(Alias = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Deployment target description.
|
||||
/// </summary>
|
||||
[YamlMember(Alias = "description")] public string Description { get; set; }
|
||||
[YamlMember(Alias = "description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Deployment target properties.
|
||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Antlr4.StringTemplate;
|
||||
using Antlr4.StringTemplate.Compiler;
|
||||
|
||||
namespace Steeltoe.Tooling
|
||||
{
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2018 the original author or authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
namespace Steeltoe.Tooling.Test.Executors
|
||||
{
|
||||
public class StatusExecutorTest : ToolingTest
|
||||
{
|
||||
}
|
||||
}
|
|
@ -53,19 +53,23 @@ namespace Steeltoe.Tooling.Test
|
|||
_registryCfg.DefineTarget("my-env", "my environment");
|
||||
_registryCfg.DefineTargetServiceTypeProperty("my-env", "my-service", "my-prop-a", "my value a");
|
||||
_registryCfg.DefineTargetServiceTypeProperty("my-env", "my-service", "my-prop-b", "my value b");
|
||||
_registryCfg.DefineTargetServiceTypeProperty("my-env", "my-other-service", "my-other-prop", "my other value");
|
||||
_registryCfg.DefineTargetServiceTypeProperty("my-env", "my-other-service", "my-other-prop",
|
||||
"my other value");
|
||||
_registryCfg.DefineTargetServiceTypeProperty("my-other-env", "my-other-env-service", "my-other-env-prop",
|
||||
"my other env value");
|
||||
_registryCfg.TargetConfigurations.Count.ShouldBe(2);
|
||||
_registryCfg.TargetConfigurations["my-env"].ShouldNotBeNull();
|
||||
_registryCfg.TargetConfigurations["my-env"].ServiceTypeProperties["my-service"].ShouldNotBeNull();
|
||||
_registryCfg.TargetConfigurations["my-env"].ServiceTypeProperties["my-service"]["my-prop-a"].ShouldBe("my value a");
|
||||
_registryCfg.TargetConfigurations["my-env"].ServiceTypeProperties["my-service"]["my-prop-b"].ShouldBe("my value b");
|
||||
_registryCfg.TargetConfigurations["my-env"].ServiceTypeProperties["my-service"]["my-prop-a"]
|
||||
.ShouldBe("my value a");
|
||||
_registryCfg.TargetConfigurations["my-env"].ServiceTypeProperties["my-service"]["my-prop-b"]
|
||||
.ShouldBe("my value b");
|
||||
_registryCfg.TargetConfigurations["my-env"].ServiceTypeProperties["my-other-service"]["my-other-prop"]
|
||||
.ShouldBe("my other value");
|
||||
_registryCfg.TargetConfigurations["my-other-env"].ShouldNotBeNull();
|
||||
_registryCfg.TargetConfigurations["my-other-env"].Description.ShouldBeNull();
|
||||
_registryCfg.TargetConfigurations["my-other-env"].ServiceTypeProperties["my-other-env-service"]["my-other-env-prop"]
|
||||
_registryCfg.TargetConfigurations["my-other-env"].ServiceTypeProperties["my-other-env-service"][
|
||||
"my-other-env-prop"]
|
||||
.ShouldBe("my other env value");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Drivers" />
|
||||
<Folder Include="Drivers\Docker" />
|
||||
<Folder Include="Drivers\Dummy" />
|
||||
</ItemGroup>
|
||||
<Target Name="SpicNSpan" AfterTargets="Clean">
|
||||
<RemoveDir Directories="$(BaseOutputPath)" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче