Add Identity to Version Control Server (#1876)

* Add Version Information for Identity Tool

* Adding Versions to JSON Output

* Restart CLA-Bot
This commit is contained in:
Stefan Benten 2019-05-01 18:21:51 +02:00 committed by GitHub
parent ecde1bd251
commit 891780990f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,7 @@ type AllowedVersions struct {
Storagenode []SemVer
Uplink []SemVer
Gateway []SemVer
Identity []SemVer
}
// SemVerRegex is the regular expression used to parse a semantic version.

View File

@ -31,6 +31,7 @@ type ServiceVersions struct {
Storagenode string `user:"true" help:"Allowed Storagenode Versions" default:"v0.0.1"`
Uplink string `user:"true" help:"Allowed Uplink Versions" default:"v0.0.1"`
Gateway string `user:"true" help:"Allowed Gateway Versions" default:"v0.0.1"`
Identity string `user:"true" help:"Allowed Identity Versions" default:"v0.0.1"`
}
// Peer is the representation of a VersionControl Server.
@ -92,6 +93,9 @@ func New(log *zap.Logger, config *Config) (peer *Peer, err error) {
gatewayVersions := strings.Split(config.Versions.Gateway, ",")
peer.Versions.Gateway, err = version.StrToSemVerList(gatewayVersions)
identityVersions := strings.Split(config.Versions.Identity, ",")
peer.Versions.Identity, err = version.StrToSemVerList(identityVersions)
peer.response, err = json.Marshal(peer.Versions)
if err != nil {