Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,7 @@ npm/*.tgz

.DS_Store

.env
.env

*.lscache
dotnet/
5 changes: 5 additions & 0 deletions core/Enums/PackageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ public enum PackageType
/// The Grafana
/// </summary>
Grafana = 16,

/// <summary>
/// The Clickhouse Database
/// </summary>
ClickhouseDatabase = 17
}
}
4 changes: 3 additions & 1 deletion core/Enums/StepType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ public enum StepType

SignEntityTypes = 35,

EnqueueXmla = 36
EnqueueXmla = 36,

GrantPermissions = 37
}
}
52 changes: 52 additions & 0 deletions core/Objects/CmfPackage/CmfPackageV1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Cmf.CLI.Core.Interfaces;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;

namespace Cmf.CLI.Core.Objects;

Expand Down Expand Up @@ -248,6 +249,57 @@ public class CmfPackageV1 : IEquatable<CmfPackageV1>
/// </value>
[JsonProperty(Order = 23)]
public string DependenciesDirectory { get; set; }

/// <summary>
/// Gets the manifest version declared in the Deployment Framework manifest.xml.
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public int ManifestVersion { get; internal set; }

/// <summary>
/// Gets the minimum SQL Server compatibility level required by the package.
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public int MinSqlCompatibility { get; internal set; }

/// <summary>
/// Gets the target layer directory, which means the directory inside the container in which
/// the package contents should be installed when using Environment Manager.
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public string TargetLayerDirectory { get; internal set; }

/// <summary>
/// Gets the package build date declared in the Deployment Framework manifest.xml.
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public DateTime? BuildDate { get; internal set; }

/// <summary>
/// Gets the package upgrade strategy declared in the Deployment Framework manifest.xml.
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public string UpgradeStrategy { get; internal set; }

/// <summary>
/// Gets the extended metadata (e.g. application name/version and custom metadata entries)
/// declared in the Deployment Framework manifest.xml.
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public Dictionary<string, string> ExtendedMetadata { get; internal set; }

/// <summary>
/// Gets the package demands declared in the Deployment Framework manifest.xml.
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public List<JObject> PackageDemands { get; internal set; }
#endregion

#region constructors
Expand Down
37 changes: 37 additions & 0 deletions core/Objects/Step.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
using Cmf.CLI.Utilities;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using System.Xml.Serialization;

namespace Cmf.CLI.Core.Objects
Expand All @@ -13,6 +16,13 @@ namespace Cmf.CLI.Core.Objects
/// <seealso cref="Step" />
public class Step : IEquatable<Step>
{
#region Private Properties

private List<XElement> _elements;
private List<JObject> _jElements;

#endregion

#region Public Properties

/// <summary>
Expand Down Expand Up @@ -274,6 +284,13 @@ public class Step : IEquatable<Step>
/// </summary>
public string Value { get; set; }

/// <summary>
/// Gets the inner XML child elements of this step (e.g. from a Deployment Framework manifest.xml step, such as &lt;Role&gt; or &lt;Object&gt;).
/// Only used when converting a DF package (manifest.xml) to its package.json representation.
/// </summary>
[JsonIgnore]
public IEnumerable<XElement> Elements => _elements;

#endregion

#region Constructors
Expand Down Expand Up @@ -334,6 +351,26 @@ public Step(StepType? type)

#region Public Methods

/// <summary>
/// Adds an inner XML child element to this step (used when parsing a Deployment Framework manifest.xml step).
/// </summary>
/// <param name="element">The element.</param>
public void AddElement(XElement element)
{
_elements ??= new List<XElement>();
_elements.Add(element);
}

/// <summary>
/// Adds an inner JSON child element to this step (used when parsing a Deployment Framework package.json step).
/// </summary>
/// <param name="element">The element.</param>
public void AddElement(JObject element)
{
_jElements ??= new List<JObject>();
_jElements.Add(element);
}

/// <summary>
/// Indicates whether the current object is equal to another object of the same type.
/// </summary>
Expand Down
Loading
Loading