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

@@ -13,21 +13,26 @@ separately. Certain meta parameters aren't very useful when combined with
certain resources, but in general, it should be fairly obvious, such as when
combining the `noop` meta parameter with the [Noop](#Noop) resource.
You might want to look at the [generated documentation](https://godoc.org/github.com/purpleidea/mgmt/resources)
You might want to look at the [generated documentation](https://godoc.org/github.com/purpleidea/mgmt/engine/resources)
for more up-to-date information about these resources.
* [Augeas](#Augeas): Manipulate files using augeas.
* [Exec](#Exec): Execute shell commands on the system.
* [File](#File): Manage files and directories.
* [Group](#Group): Manage system groups.
* [Hostname](#Hostname): Manages the hostname on the system.
* [KV](#KV): Set a key value pair in our shared world database.
* [Msg](#Msg): Send log messages.
* [Net](#Net): Manage a local network interface.
* [Noop](#Noop): A simple resource that does nothing.
* [Nspawn](#Nspawn): Manage systemd-machined nspawn containers.
* [Password](#Password): Create random password strings.
* [Pkg](#Pkg): Manage system packages with PackageKit.
* [Print](#Print): Print messages to the console.
* [Svc](#Svc): Manage system systemd services.
* [Test](#Test): A mostly harmless resource that is used for internal testing.
* [Timer](#Timer): Manage system systemd services.
* [User](#User): Manage system users.
* [Virt](#Virt): Manage virtual machines with libvirt.
## Augeas
@@ -82,6 +87,10 @@ The force property is required if we want the file resource to be able to change
a file into a directory or vice-versa. If such a change is needed, but the force
property is not set to `true`, then this file resource will error.
## Group
The group resource manages the system groups from `/etc/group`.
## Hostname
The hostname resource manages static, transient/dynamic and pretty hostnames
@@ -143,6 +152,10 @@ would expect.
The msg resource sends messages to the main log, or an external service such
as systemd's journal.
## Net
The net resource manages a local network interface using netlink.
## Noop
The noop resource does absolutely nothing. It does have some utility in testing
@@ -164,13 +177,25 @@ different distributions because it uses the underlying packagekit facility which
supports different backends for different environments. This ensures that we
have great Debian (deb/dpkg) and Fedora (rpm/dnf) support simultaneously.
## Print
The print resource prints messages to the console.
## Svc
The service resource is still very WIP. Please help us my improving it!
The service resource is still very WIP. Please help us by improving it!
## Test
The test resource is mostly harmless and is used for internal tests.
## Timer
This resource needs better documentation. Please help us my improving it!
This resource needs better documentation. Please help us by improving it!
## User
The user resource manages the system users from `/etc/passwd`.
## Virt

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
}