func (c *Client) EnableDebug() {
	c.debug = true
}
EnableDebug enables the debug mode
package rpc
import (
	"encoding/xml"
	"fmt"
	"log"
	"github.com/czerwonk/junos_exporter/connector"
)
type Parser func([]byte) error
type ClientCfg struct {
	SatelliteEnabled bool
}
type Client struct {
	conn      *connector.SSHConnection
	debug     bool
	Satellite bool
}
func NewClient(ssh *connector.SSHConnection) *Client {
	rpc := &Client{conn: ssh}
	return rpc
}
func (c *Client) RunCommandAndParse(cmd string, obj interface{}) error {
	return c.RunCommandAndParseWithParser(cmd, func(b []byte) error {
		return xml.Unmarshal(b, obj)
	})
}
func (c *Client) RunCommandAndParseWithParser(cmd string, parser Parser) error {
	if c.debug {
		log.Printf("Running command on %s: %s\n", c.conn.Host(), cmd)
	}
	b, err := c.conn.RunCommand(fmt.Sprintf("%s | display xml", cmd))
	if err != nil {
		return err
	}
	if c.debug {
		log.Printf("Output for %s: %s\n", c.conn.Host(), string(b))
	}
	err = parser(b)
	return err
}
func (c *Client) Device() *connector.Device {
	return c.conn.Device()
}