info

package
v1.0.0-beta7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CliCommand = cli.Command{
	Name:  "info",
	Usage: "Shows version information about the OpenNMS server",
	Action: func(c *cli.Context) error {
		jsonInfo, err := rest.Instance.Get("/rest/info")
		if err != nil {
			return err
		}
		info := model.OnmsInfo{}
		err = json.Unmarshal(jsonInfo, &info)
		if err != nil {
			return err
		}
		data, err := yaml.Marshal(&info)
		if err != nil {
			return err
		}
		fmt.Println(string(data))
		return nil
	},
}

CliCommand the CLI command to provide server information

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL