docs, test: Remove old reference to resources package

Forgot to change this previously. Also updated the resources list in the
documentation.
This commit is contained in:
James Shubin
2018-05-02 15:28:15 -04:00
parent d7029871b1
commit a589e2ecf3
3 changed files with 34 additions and 9 deletions

View File

@@ -9,10 +9,10 @@ import (
"syscall"
"time"
"github.com/purpleidea/mgmt/engine"
"github.com/purpleidea/mgmt/gapi"
mgmt "github.com/purpleidea/mgmt/lib"
"github.com/purpleidea/mgmt/pgraph"
"github.com/purpleidea/mgmt/resources"
)
// MyGAPI implements the main GAPI interface.
@@ -62,7 +62,7 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
return nil, err
}
n0, err := resources.NewNamedResource("noop", "noop1")
n0, err := engine.NewNamedResource("noop", "noop1")
if err != nil {
return nil, err
}

View File

@@ -9,10 +9,10 @@ import (
"syscall"
"time"
"github.com/purpleidea/mgmt/engine"
"github.com/purpleidea/mgmt/gapi"
mgmt "github.com/purpleidea/mgmt/lib"
"github.com/purpleidea/mgmt/pgraph"
"github.com/purpleidea/mgmt/resources"
)
// MyGAPI implements the main GAPI interface.
@@ -69,7 +69,7 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
}
if !obj.flipflop {
n0, err := resources.NewNamedResource("noop", "noop0")
n0, err := engine.NewNamedResource("noop", "noop0")
if err != nil {
return nil, err
}
@@ -77,14 +77,14 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
} else {
// NOTE: these will get autogrouped
n1, err := resources.NewNamedResource("noop", "noop1")
n1, err := engine.NewNamedResource("noop", "noop1")
if err != nil {
return nil, err
}
n1.Meta().AutoGroup = obj.autoGroup // enable or disable it
g.AddVertex(n1)
n2, err := resources.NewNamedResource("noop", "noop2")
n2, err := engine.NewNamedResource("noop", "noop2")
if err != nil {
return nil, err
}