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:
@@ -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
|
certain resources, but in general, it should be fairly obvious, such as when
|
||||||
combining the `noop` meta parameter with the [Noop](#Noop) resource.
|
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.
|
for more up-to-date information about these resources.
|
||||||
|
|
||||||
* [Augeas](#Augeas): Manipulate files using augeas.
|
* [Augeas](#Augeas): Manipulate files using augeas.
|
||||||
* [Exec](#Exec): Execute shell commands on the system.
|
* [Exec](#Exec): Execute shell commands on the system.
|
||||||
* [File](#File): Manage files and directories.
|
* [File](#File): Manage files and directories.
|
||||||
|
* [Group](#Group): Manage system groups.
|
||||||
* [Hostname](#Hostname): Manages the hostname on the system.
|
* [Hostname](#Hostname): Manages the hostname on the system.
|
||||||
* [KV](#KV): Set a key value pair in our shared world database.
|
* [KV](#KV): Set a key value pair in our shared world database.
|
||||||
* [Msg](#Msg): Send log messages.
|
* [Msg](#Msg): Send log messages.
|
||||||
|
* [Net](#Net): Manage a local network interface.
|
||||||
* [Noop](#Noop): A simple resource that does nothing.
|
* [Noop](#Noop): A simple resource that does nothing.
|
||||||
* [Nspawn](#Nspawn): Manage systemd-machined nspawn containers.
|
* [Nspawn](#Nspawn): Manage systemd-machined nspawn containers.
|
||||||
* [Password](#Password): Create random password strings.
|
* [Password](#Password): Create random password strings.
|
||||||
* [Pkg](#Pkg): Manage system packages with PackageKit.
|
* [Pkg](#Pkg): Manage system packages with PackageKit.
|
||||||
|
* [Print](#Print): Print messages to the console.
|
||||||
* [Svc](#Svc): Manage system systemd services.
|
* [Svc](#Svc): Manage system systemd services.
|
||||||
|
* [Test](#Test): A mostly harmless resource that is used for internal testing.
|
||||||
* [Timer](#Timer): Manage system systemd services.
|
* [Timer](#Timer): Manage system systemd services.
|
||||||
|
* [User](#User): Manage system users.
|
||||||
* [Virt](#Virt): Manage virtual machines with libvirt.
|
* [Virt](#Virt): Manage virtual machines with libvirt.
|
||||||
|
|
||||||
## Augeas
|
## 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
|
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.
|
property is not set to `true`, then this file resource will error.
|
||||||
|
|
||||||
|
## Group
|
||||||
|
|
||||||
|
The group resource manages the system groups from `/etc/group`.
|
||||||
|
|
||||||
## Hostname
|
## Hostname
|
||||||
|
|
||||||
The hostname resource manages static, transient/dynamic and pretty hostnames
|
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
|
The msg resource sends messages to the main log, or an external service such
|
||||||
as systemd's journal.
|
as systemd's journal.
|
||||||
|
|
||||||
|
## Net
|
||||||
|
|
||||||
|
The net resource manages a local network interface using netlink.
|
||||||
|
|
||||||
## Noop
|
## Noop
|
||||||
|
|
||||||
The noop resource does absolutely nothing. It does have some utility in testing
|
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
|
supports different backends for different environments. This ensures that we
|
||||||
have great Debian (deb/dpkg) and Fedora (rpm/dnf) support simultaneously.
|
have great Debian (deb/dpkg) and Fedora (rpm/dnf) support simultaneously.
|
||||||
|
|
||||||
|
## Print
|
||||||
|
|
||||||
|
The print resource prints messages to the console.
|
||||||
|
|
||||||
## Svc
|
## 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
|
## 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
|
## Virt
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/purpleidea/mgmt/engine"
|
||||||
"github.com/purpleidea/mgmt/gapi"
|
"github.com/purpleidea/mgmt/gapi"
|
||||||
mgmt "github.com/purpleidea/mgmt/lib"
|
mgmt "github.com/purpleidea/mgmt/lib"
|
||||||
"github.com/purpleidea/mgmt/pgraph"
|
"github.com/purpleidea/mgmt/pgraph"
|
||||||
"github.com/purpleidea/mgmt/resources"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MyGAPI implements the main GAPI interface.
|
// MyGAPI implements the main GAPI interface.
|
||||||
@@ -62,7 +62,7 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
n0, err := resources.NewNamedResource("noop", "noop1")
|
n0, err := engine.NewNamedResource("noop", "noop1")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/purpleidea/mgmt/engine"
|
||||||
"github.com/purpleidea/mgmt/gapi"
|
"github.com/purpleidea/mgmt/gapi"
|
||||||
mgmt "github.com/purpleidea/mgmt/lib"
|
mgmt "github.com/purpleidea/mgmt/lib"
|
||||||
"github.com/purpleidea/mgmt/pgraph"
|
"github.com/purpleidea/mgmt/pgraph"
|
||||||
"github.com/purpleidea/mgmt/resources"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MyGAPI implements the main GAPI interface.
|
// MyGAPI implements the main GAPI interface.
|
||||||
@@ -69,7 +69,7 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !obj.flipflop {
|
if !obj.flipflop {
|
||||||
n0, err := resources.NewNamedResource("noop", "noop0")
|
n0, err := engine.NewNamedResource("noop", "noop0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -77,14 +77,14 @@ func (obj *MyGAPI) Graph() (*pgraph.Graph, error) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// NOTE: these will get autogrouped
|
// NOTE: these will get autogrouped
|
||||||
n1, err := resources.NewNamedResource("noop", "noop1")
|
n1, err := engine.NewNamedResource("noop", "noop1")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
n1.Meta().AutoGroup = obj.autoGroup // enable or disable it
|
n1.Meta().AutoGroup = obj.autoGroup // enable or disable it
|
||||||
g.AddVertex(n1)
|
g.AddVertex(n1)
|
||||||
|
|
||||||
n2, err := resources.NewNamedResource("noop", "noop2")
|
n2, err := engine.NewNamedResource("noop", "noop2")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user