Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalClient
Commits
bf7a665c
Commit
bf7a665c
authored
Dec 12, 2018
by
Lukas Burgey
Browse files
Change string method
parent
7531772d
Changes
9
Hide whitespace changes
Inline
Side-by-side
deployments/deployments.go
View file @
bf7a665c
...
...
@@ -46,7 +46,10 @@ type (
)
func
(
dep
Dep
)
String
()
string
{
return
fmt
.
Sprintf
(
"[Dep:%v:%v]"
,
dep
.
ID
,
dep
.
Service
.
Name
)
if
dep
.
Service
!=
(
config
.
Service
{})
{
return
fmt
.
Sprintf
(
"Dep[%v]#%v"
,
dep
.
Service
.
Name
,
dep
.
ID
)
}
return
fmt
.
Sprintf
(
"Dep#%v"
,
dep
.
ID
)
}
// Log logs a message for a Dep
...
...
@@ -55,7 +58,7 @@ func (dep Dep) Log(formatString string, params ...interface{}) {
}
func
(
rep
Reply
)
String
()
string
{
return
fmt
.
Sprintf
(
"
[D
ep
:
%v
:
%v]"
,
rep
.
ID
,
rep
.
Service
.
Name
)
return
fmt
.
Sprintf
(
"
R
ep
[
%v
]#
%v]"
,
rep
.
Service
.
Name
,
rep
.
ID
)
}
// Log logs a message for a Reply
...
...
deps/deps.go
deleted
100644 → 0
View file @
7531772d
package
deps
import
(
"fmt"
"log"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalScripts"
)
type
(
// VO virtual organisation
VO
struct
{
ID
int
`json:"id"`
Name
string
`json:"name"`
ResourceType
string
`json:"resourcetype"`
}
// Dep describes a deployment action
Dep
struct
{
ID
int
`json:"id"`
StateTarget
scripts
.
State
`json:"state_target"`
User
scripts
.
User
`json:"user"`
Credentials
map
[
string
][]
scripts
.
Credential
`json:"credentials"`
Questionnaire
map
[
string
]
string
`json:"questionnaire"`
// this relates to the polymorphic type added by the polymorphic serializer
ResourceType
string
`json:"resourcetype"`
// VO is only set if this is a VODeployment
VO
VO
`json:"vo,omitempty"`
// Service may be filled by scheduleDep
Service
config
.
Service
`json:"service,omitempty"`
}
// Reply is sent back to the backend to inform it about executed deployment actions
Reply
struct
{
// ID of the according Dep (at the backend: DeploymentState)
ID
int
`json:"id"`
Output
scripts
.
Output
`json:"output"`
// Service is the service for which we performed the deploy action
Service
config
.
Service
`json:"service"`
}
)
func
(
dep
Dep
)
String
()
string
{
return
fmt
.
Sprintf
(
"[Dep:%v:%v]"
,
dep
.
ID
,
dep
.
Service
.
Name
)
}
// Log logs a message for a Dep
func
(
dep
Dep
)
Log
(
formatString
string
,
params
...
interface
{})
{
log
.
Printf
(
"%s "
+
formatString
,
append
([]
interface
{}{
dep
},
params
...
)
...
)
}
func
(
rep
Reply
)
String
()
string
{
return
fmt
.
Sprintf
(
"[Dep:%v:%v]"
,
rep
.
ID
,
rep
.
Service
.
Name
)
}
// Log logs a message for a Reply
func
(
rep
Reply
)
Log
(
formatString
string
,
params
...
interface
{})
{
log
.
Printf
(
"%s "
+
formatString
,
append
([]
interface
{}{
rep
},
params
...
)
...
)
}
feudalClient
deleted
100755 → 0
View file @
7531772d
File deleted
main.go
View file @
bf7a665c
...
...
@@ -7,7 +7,7 @@ import (
"os"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deps"
"git.scc.kit.edu/feudal/feudalClient/dep
loyment
s"
"git.scc.kit.edu/feudal/feudalClient/sink"
"git.scc.kit.edu/feudal/feudalClient/sink/script"
"git.scc.kit.edu/feudal/feudalClient/source"
...
...
@@ -22,6 +22,8 @@ var (
"Client for the Federated User Credential Deployment Portal (FEUDAL)"
,
)
.
Author
(
"Lukas Burgey"
,
)
.
Version
(
"v1.1.0"
,
)
cmdStart
=
app
.
Command
(
"start"
,
"Starts the client in its normal operation mode."
)
.
Default
()
cmdDeregister
=
app
.
Command
(
"deregister"
,
"Before disabling the client: Use deregister to inform the backend that the client ceases operation."
)
...
...
sink/script/script.go
View file @
bf7a665c
...
...
@@ -13,7 +13,7 @@ import (
"time"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deps"
"git.scc.kit.edu/feudal/feudalClient/dep
loyment
s"
"git.scc.kit.edu/feudal/feudalScripts"
)
...
...
sink/sink.go
View file @
bf7a665c
...
...
@@ -2,7 +2,7 @@ package sink
import
(
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deps"
"git.scc.kit.edu/feudal/feudalClient/dep
loyment
s"
)
// Sink handles incoming deployments
...
...
source/amqp/amqp.go
View file @
bf7a665c
...
...
@@ -8,7 +8,7 @@ import (
"time"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deps"
"git.scc.kit.edu/feudal/feudalClient/dep
loyment
s"
"github.com/streadway/amqp"
)
...
...
source/rest/rest.go
View file @
bf7a665c
...
...
@@ -10,7 +10,7 @@ import (
"time"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deps"
"git.scc.kit.edu/feudal/feudalClient/dep
loyment
s"
)
type
(
...
...
source/source.go
View file @
bf7a665c
...
...
@@ -2,7 +2,7 @@ package source
import
(
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deps"
"git.scc.kit.edu/feudal/feudalClient/dep
loyment
s"
)
// Source are sources of deployments like amqp and http
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment