1 diff --git a/src/orchestrationapi/orchestration.go b/src/orchestrationapi/orchestration.go
2 index 60673bc..8af5a20 100644
3 --- a/src/orchestrationapi/orchestration.go
4 +++ b/src/orchestrationapi/orchestration.go
5 @@ -39,7 +39,7 @@ import (
7 const logtag = "Orchestration"
9 -// Orche is the interface implemented by orchestration start funciton
10 +// Orche is the interface implemented by orchestration start function
11 type Orche interface {
12 Start(deviceIDPath string, platform string, executionType string)
14 @@ -47,6 +47,10 @@ type Orche interface {
15 // OrcheExternalAPI is the interface implemented by external REST API
16 type OrcheExternalAPI interface {
17 RequestService(serviceInfo ReqeustService) ResponseService
18 + GetAuthenticatedDeviceList(serviceName string, execType string) ([]string, error)
19 + ReadCapability(ip string) (string, error)
20 + WriteCapability(capJson string) error
21 + RequestServiceOnDevice(serviceInfo ReqeustService, ip string) ResponseService
24 // OrcheInternalAPI is the interface implemented by internal REST API
25 @@ -106,8 +110,10 @@ type OrchestrationBuilder struct {
28 clientAPI client.Clienter
31 + isSetCapability bool
32 + capabilityIns configuremgr.CapabilityImpl
34 // SetScoring registers the interface to handle resource scoring
35 func (o *OrchestrationBuilder) SetScoring(s scoringmgr.Scoring) {
37 @@ -144,10 +150,15 @@ func (o *OrchestrationBuilder) SetClient(c client.Clienter) {
41 -// Build registrers every interface to run orchestration
42 +func (o *OrchestrationBuilder) SetCapability(c configuremgr.CapabilityImpl) {
43 + o.isSetCapability = true
47 +// Build registers every interface to run orchestration
48 func (o OrchestrationBuilder) Build() Orche {
49 if !o.isSetWatcher || !o.isSetDiscovery || !o.isSetScoring ||
50 - !o.isSetService || !o.isSetExecutor || !o.isSetClient {
51 + !o.isSetService || !o.isSetExecutor || !o.isSetClient || !o.isSetCapability {
55 @@ -157,6 +168,7 @@ func (o OrchestrationBuilder) Build() Orche {
56 orcheIns.watcher = o.watcherIns
57 orcheIns.serviceIns = o.serviceIns
58 orcheIns.clientAPI = o.clientAPI
59 + orcheIns.capabilityIns = o.capabilityIns
60 resourceMonitorImpl = resourceutil.GetMonitoringInstance()
62 orcheIns.notificationIns = notification.GetInstance()