rebased on new API
This commit is contained in:
1
Makefile
1
Makefile
@@ -260,6 +260,7 @@ dist: vendor config
|
||||
## sudo ldconfig # refresh shared library cache.
|
||||
## To setup protoc-gen-grpc-gateway, see https://github.com/grpc-ecosystem/grpc-gateway
|
||||
proto:
|
||||
rm -r internal/pkg/api/routes/wwapiv1/
|
||||
protoc -I internal/pkg/api/routes/v1 -I=. \
|
||||
--grpc-gateway_out=. \
|
||||
--grpc-gateway_opt logtostderr=true \
|
||||
|
||||
1
go.mod
1
go.mod
@@ -10,6 +10,7 @@ require (
|
||||
github.com/creasty/defaults v1.5.2
|
||||
github.com/fatih/color v1.13.0
|
||||
github.com/golang/glog v1.0.0
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/google/uuid v1.1.2
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0
|
||||
github.com/manifoldco/promptui v0.8.0
|
||||
|
||||
@@ -10,49 +10,16 @@ import (
|
||||
)
|
||||
|
||||
func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
realMap := make(map[string]string)
|
||||
for key, val := range OptionStrMap {
|
||||
realMap[key] = *val
|
||||
}
|
||||
set := wwapiv1.NodeSetParameter{
|
||||
Comment: SetComment,
|
||||
Container: SetContainer,
|
||||
KernelOverride: SetKernelOverride,
|
||||
KernelArgs: SetKernelArgs,
|
||||
Netname: SetNetName,
|
||||
Netdev: SetNetDev,
|
||||
Ipaddr: SetIpaddr,
|
||||
Netmask: SetNetmask,
|
||||
Gateway: SetGateway,
|
||||
Hwaddr: SetHwaddr,
|
||||
Type: SetType,
|
||||
Onboot: SetNetOnBoot,
|
||||
NetDefault: SetNetPrimary,
|
||||
NetdevDelete: SetNetDevDel,
|
||||
Cluster: SetClusterName,
|
||||
Ipxe: SetIpxe,
|
||||
InitOverlay: SetInitOverlay,
|
||||
RuntimeOverlay: SetRuntimeOverlay,
|
||||
SystemOverlay: SetSystemOverlay,
|
||||
IpmiIpaddr: SetIpmiIpaddr,
|
||||
IpmiNetmask: SetIpmiNetmask,
|
||||
IpmiPort: SetIpmiPort,
|
||||
IpmiGateway: SetIpmiGateway,
|
||||
IpmiUsername: SetIpmiUsername,
|
||||
IpmiPassword: SetIpmiPassword,
|
||||
IpmiInterface: SetIpmiInterface,
|
||||
IpmiWrite: SetIpmiWrite,
|
||||
AllNodes: SetNodeAll,
|
||||
Profile: SetProfile,
|
||||
ProfileAdd: SetAddProfile,
|
||||
ProfileDelete: SetDelProfile,
|
||||
Force: SetForce,
|
||||
Init: SetInit,
|
||||
Discoverable: SetDiscoverable,
|
||||
Undiscoverable: SetUndiscoverable,
|
||||
Root: SetRoot,
|
||||
Tags: SetTags,
|
||||
TagsDelete: SetDelTags,
|
||||
AssetKey: SetAssetKey,
|
||||
NodeNames: args,
|
||||
NetTags: SetNetTags,
|
||||
NetDeleteTags: SetNetDelTags,
|
||||
OptionsStrMap: realMap,
|
||||
NetdevDelete: SetNetDevDel,
|
||||
AllNodes: SetNodeAll,
|
||||
Force: SetForce,
|
||||
NodeNames: args,
|
||||
}
|
||||
|
||||
if !SetYes {
|
||||
|
||||
@@ -32,16 +32,12 @@ var (
|
||||
return node_names, cobra.ShellCompDirectiveNoFileComp
|
||||
},
|
||||
}
|
||||
SetNetDevDel bool
|
||||
SetNodeAll bool
|
||||
SetYes bool
|
||||
SetForce bool
|
||||
SetTags []string
|
||||
SetDelTags []string
|
||||
SetNetTags []string
|
||||
SetNetDelTags []string
|
||||
OptionStrMap map[string]*string
|
||||
KernelStrMap map[string]*string
|
||||
SetNetDevDel bool
|
||||
SetNodeAll bool
|
||||
SetYes bool
|
||||
SetForce bool
|
||||
OptionStrMap map[string]*string
|
||||
KernelStrMap map[string]*string
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -53,7 +49,6 @@ func init() {
|
||||
emptyNodeConf.Ipmi = new(node.IpmiConf)
|
||||
//emptyNodeConf.NetDevs = make(map[string]*node.NetDevs)
|
||||
OptionStrMap = myBase.CreateFlags(emptyNodeConf)
|
||||
|
||||
if err := baseCmd.RegisterFlagCompletionFunc("container", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
list, _ := container.ListSources()
|
||||
return list, cobra.ShellCompDirectiveNoFileComp
|
||||
@@ -72,7 +67,7 @@ func init() {
|
||||
}); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
if err := baseCmd.RegisterFlagCompletionFunc("system", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
if err := baseCmd.RegisterFlagCompletionFunc("wwinit", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
list, _ := overlay.FindOverlays()
|
||||
return list, cobra.ShellCompDirectiveNoFileComp
|
||||
}); err != nil {
|
||||
@@ -95,11 +90,6 @@ func init() {
|
||||
}
|
||||
|
||||
baseCmd.PersistentFlags().BoolVar(&SetNetDevDel, "netdel", false, "Delete the node's network device")
|
||||
baseCmd.PersistentFlags().StringSliceVar(&SetNetTags, "nettag", []string{}, "Define custom tag to network device (key=value)")
|
||||
baseCmd.PersistentFlags().StringSliceVar(&SetNetDelTags, "netdeltag", []string{}, "Delete tag for network device")
|
||||
|
||||
baseCmd.PersistentFlags().StringSliceVarP(&SetTags, "tag", "t", []string{}, "Define custom tag (key=value)")
|
||||
baseCmd.PersistentFlags().StringSliceVar(&SetDelTags, "tagdel", []string{}, "Delete tag")
|
||||
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetNodeAll, "all", "a", false, "Set all nodes")
|
||||
|
||||
|
||||
@@ -533,10 +533,11 @@ func NodeSetParameterCheck(set *wwapiv1.NodeSetParameter, console bool) (nodeDB
|
||||
|
||||
for _, n := range nodes {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Evaluating node: %s\n", n.Id.Get())
|
||||
|
||||
if set.Comment != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting comment to: %s\n", n.Id.Get(), set.Comment)
|
||||
n.Comment.Set(set.Comment)
|
||||
for key, val := range set.OptionsStrMap {
|
||||
if val != "" {
|
||||
wwlog.Verbose("node:%s setting %s to %s\n", n.Id.Get(), key, val)
|
||||
n.SetField(key, val)
|
||||
}
|
||||
}
|
||||
|
||||
if set.Container != "" {
|
||||
@@ -544,266 +545,23 @@ func NodeSetParameterCheck(set *wwapiv1.NodeSetParameter, console bool) (nodeDB
|
||||
n.ContainerName.Set(set.Container)
|
||||
}
|
||||
|
||||
if set.Init != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting init command to: %s\n", n.Id.Get(), set.Init)
|
||||
n.Init.Set(set.Init)
|
||||
}
|
||||
|
||||
if set.Root != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting root to: %s\n", n.Id.Get(), set.Root)
|
||||
n.Root.Set(set.Root)
|
||||
}
|
||||
|
||||
if set.AssetKey != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting asset key to: %s\n", n.Id.Get(), set.AssetKey)
|
||||
n.AssetKey.Set(set.AssetKey)
|
||||
}
|
||||
|
||||
if set.KernelOverride != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting kernel override to: %s\n", n.Id.Get(), set.KernelOverride)
|
||||
n.Kernel.Override.Set(set.KernelOverride)
|
||||
}
|
||||
|
||||
if set.KernelArgs != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting kernel args to: %s\n", n.Id.Get(), set.KernelArgs)
|
||||
n.Kernel.Args.Set(set.KernelArgs)
|
||||
}
|
||||
|
||||
if set.Cluster != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting cluster name to: %s\n", n.Id.Get(), set.Cluster)
|
||||
n.ClusterName.Set(set.Cluster)
|
||||
}
|
||||
|
||||
if set.Ipxe != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting iPXE template to: %s\n", n.Id.Get(), set.Ipxe)
|
||||
n.Ipxe.Set(set.Ipxe)
|
||||
}
|
||||
|
||||
if len(set.RuntimeOverlay) != 0 {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting runtime overlay to: %s\n", n.Id.Get(), set.RuntimeOverlay)
|
||||
n.RuntimeOverlay.SetSlice(set.RuntimeOverlay)
|
||||
}
|
||||
|
||||
if len(set.SystemOverlay) != 0 {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting system overlay to: %s\n", n.Id.Get(), set.SystemOverlay)
|
||||
n.SystemOverlay.SetSlice(set.SystemOverlay)
|
||||
}
|
||||
|
||||
if set.IpmiIpaddr != "" {
|
||||
newIpaddr := util.IncrementIPv4(set.IpmiIpaddr, nodeCount)
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI IP address to: %s\n", n.Id.Get(), newIpaddr)
|
||||
n.Ipmi.Ipaddr.Set(newIpaddr)
|
||||
}
|
||||
|
||||
if set.IpmiNetmask != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI netmask to: %s\n", n.Id.Get(), set.IpmiNetmask)
|
||||
n.Ipmi.Netmask.Set(set.IpmiNetmask)
|
||||
}
|
||||
|
||||
if set.IpmiPort != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI port to: %s\n", n.Id.Get(), set.IpmiPort)
|
||||
n.Ipmi.Port.Set(set.IpmiPort)
|
||||
}
|
||||
|
||||
if set.IpmiGateway != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI gateway to: %s\n", n.Id.Get(), set.IpmiGateway)
|
||||
n.Ipmi.Gateway.Set(set.IpmiGateway)
|
||||
}
|
||||
|
||||
if set.IpmiUsername != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI IP username to: %s\n", n.Id.Get(), set.IpmiUsername)
|
||||
n.Ipmi.UserName.Set(set.IpmiUsername)
|
||||
}
|
||||
|
||||
if set.IpmiPassword != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI IP password to: %s\n", n.Id.Get(), set.IpmiPassword)
|
||||
n.Ipmi.Password.Set(set.IpmiPassword)
|
||||
}
|
||||
|
||||
if set.IpmiInterface != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting IPMI IP interface to: %s\n", n.Id.Get(), set.IpmiInterface)
|
||||
n.Ipmi.Interface.Set(set.IpmiInterface)
|
||||
}
|
||||
|
||||
if set.IpmiWrite == "yes" || set.Onboot == "y" || set.Onboot == "1" || set.Onboot == "true" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting Ipmiwrite to %s\n", n.Id.Get(), set.IpmiWrite)
|
||||
n.Ipmi.Write.SetB(true)
|
||||
} else {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting Ipmiwrite to %s\n", n.Id.Get(), set.IpmiWrite)
|
||||
n.Ipmi.Write.SetB(false)
|
||||
}
|
||||
|
||||
if set.Discoverable {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting node to discoverable\n", n.Id.Get())
|
||||
n.Discoverable.SetB(true)
|
||||
}
|
||||
|
||||
if set.Undiscoverable {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting node to undiscoverable\n", n.Id.Get())
|
||||
n.Discoverable.SetB(false)
|
||||
}
|
||||
|
||||
if set.Profile != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting profiles to: %s\n", n.Id.Get(), set.Profile)
|
||||
n.Profiles = []string{set.Profile}
|
||||
}
|
||||
|
||||
if len(set.ProfileAdd) > 0 {
|
||||
for _, p := range set.ProfileAdd {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, adding profile '%s'\n", n.Id.Get(), p)
|
||||
n.Profiles = util.SliceAddUniqueElement(n.Profiles, p)
|
||||
}
|
||||
}
|
||||
|
||||
if len(set.ProfileDelete) > 0 {
|
||||
for _, p := range set.ProfileDelete {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, deleting profile '%s'\n", n.Id.Get(), p)
|
||||
n.Profiles = util.SliceRemoveElement(n.Profiles, p)
|
||||
}
|
||||
}
|
||||
|
||||
if set.Netname != "" {
|
||||
if _, ok := n.NetDevs[set.Netname]; !ok {
|
||||
var nd node.NetDevEntry
|
||||
nd.Tags = make(map[string]*node.Entry)
|
||||
|
||||
n.NetDevs[set.Netname] = &nd
|
||||
|
||||
if set.Netdev == "" {
|
||||
n.NetDevs[set.Netname].Device.Set(set.Netname)
|
||||
}
|
||||
}
|
||||
var def bool = true
|
||||
|
||||
// NOTE: This is overriding parameters passed in by the caller.
|
||||
set.Onboot = "yes"
|
||||
|
||||
for _, n := range n.NetDevs {
|
||||
if n.Primary.GetB() {
|
||||
def = false
|
||||
}
|
||||
}
|
||||
|
||||
if def {
|
||||
set.NetDefault = "yes"
|
||||
}
|
||||
}
|
||||
|
||||
if set.Netdev != "" {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting net Device to: %s\n", n.Id.Get(), set.Netname, set.Netdev)
|
||||
n.NetDevs[set.Netname].Device.Set(set.Netdev)
|
||||
}
|
||||
|
||||
if set.Ipaddr != "" {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
newIpaddr := util.IncrementIPv4(set.Ipaddr, nodeCount)
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting Ipaddr to: %s\n", n.Id.Get(), set.Netname, newIpaddr)
|
||||
n.NetDevs[set.Netname].Ipaddr.Set(newIpaddr)
|
||||
}
|
||||
|
||||
if set.Netmask != "" {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting netmask to: %s\n", n.Id.Get(), set.Netname, set.Netmask)
|
||||
n.NetDevs[set.Netname].Netmask.Set(set.Netmask)
|
||||
}
|
||||
|
||||
if set.Gateway != "" {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting gateway to: %s\n", n.Id.Get(), set.Netname, set.Gateway)
|
||||
n.NetDevs[set.Netname].Gateway.Set(set.Gateway)
|
||||
}
|
||||
|
||||
if set.Hwaddr != "" {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting HW address to: %s\n", n.Id.Get(), set.Netname, set.Hwaddr)
|
||||
n.NetDevs[set.Netname].Hwaddr.Set(strings.ToLower(set.Hwaddr))
|
||||
}
|
||||
|
||||
if set.Type != "" {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting Type %s\n", n.Id.Get(), set.Netname, set.Type)
|
||||
n.NetDevs[set.Netname].Type.Set(set.Type)
|
||||
}
|
||||
|
||||
if set.Onboot != "" {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if set.Onboot == "yes" || set.Onboot == "y" || set.Onboot == "1" || set.Onboot == "true" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting ONBOOT\n", n.Id.Get(), set.Netname)
|
||||
n.NetDevs[set.Netname].OnBoot.SetB(true)
|
||||
} else {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Unsetting ONBOOT\n", n.Id.Get(), set.Netname)
|
||||
n.NetDevs[set.Netname].OnBoot.SetB(false)
|
||||
}
|
||||
}
|
||||
|
||||
if set.NetDefault != "" {
|
||||
if set.Netname == "" {
|
||||
err = fmt.Errorf("You must include the '--netname' option")
|
||||
wwlog.Printf(wwlog.ERROR, fmt.Sprintf("%v\n", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
if set.NetDefault == "yes" || set.NetDefault == "y" || set.NetDefault == "1" || set.NetDefault == "true" {
|
||||
|
||||
// Set all other devices to non-default
|
||||
for _, n := range n.NetDevs {
|
||||
n.Primary.SetB(false)
|
||||
/*
|
||||
if set.NetdevDelete {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting PRIMARY\n", n.Id.Get(), set.Netname)
|
||||
n.NetDevs[set.Netname].Primary.SetB(true)
|
||||
} else {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Unsetting PRIMARY\n", n.Id.Get(), set.Netname)
|
||||
n.NetDevs[set.Netname].Primary.SetB(false)
|
||||
if _, ok := n.NetDevs[set.Netname]; !ok {
|
||||
err = fmt.Errorf("Network device name doesn't exist: %s", set.Netname)
|
||||
wwlog.Printf(wwlog.ERROR, fmt.Sprintf("%v\n", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Deleting network device: %s\n", n.Id.Get(), set.Netname)
|
||||
delete(n.NetDevs, set.Netname)
|
||||
}
|
||||
}
|
||||
|
||||
if set.NetdevDelete {
|
||||
err = checkNetNameRequired(set.Netname)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if _, ok := n.NetDevs[set.Netname]; !ok {
|
||||
err = fmt.Errorf("Network device name doesn't exist: %s", set.Netname)
|
||||
wwlog.Printf(wwlog.ERROR, fmt.Sprintf("%v\n", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Deleting network device: %s\n", n.Id.Get(), set.Netname)
|
||||
delete(n.NetDevs, set.Netname)
|
||||
}
|
||||
|
||||
*/
|
||||
if len(set.Tags) > 0 {
|
||||
for _, t := range set.Tags {
|
||||
keyval := strings.SplitN(t, "=", 2)
|
||||
@@ -833,36 +591,36 @@ func NodeSetParameterCheck(set *wwapiv1.NodeSetParameter, console bool) (nodeDB
|
||||
delete(n.Tags, key)
|
||||
}
|
||||
}
|
||||
/*
|
||||
if len(set.NetTags) > 0 {
|
||||
for _, t := range set.NetTags {
|
||||
keyval := strings.SplitN(t, "=", 2)
|
||||
key := keyval[0]
|
||||
val := keyval[1]
|
||||
if _, ok := n.NetDevs[set.Netname].Tags[key]; !ok {
|
||||
var nd node.Entry
|
||||
n.NetDevs[set.Netname].Tags[key] = &nd
|
||||
}
|
||||
|
||||
if len(set.NetTags) > 0 {
|
||||
for _, t := range set.NetTags {
|
||||
keyval := strings.SplitN(t, "=", 2)
|
||||
key := keyval[0]
|
||||
val := keyval[1]
|
||||
if _, ok := n.NetDevs[set.Netname].Tags[key]; !ok {
|
||||
var nd node.Entry
|
||||
n.NetDevs[set.Netname].Tags[key] = &nd
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting NETTAG '%s'='%s'\n", n.Id.Get(), set.Netname, key, val)
|
||||
n.NetDevs[set.Netname].Tags[key].Set(val)
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Setting NETTAG '%s'='%s'\n", n.Id.Get(), set.Netname, key, val)
|
||||
n.NetDevs[set.Netname].Tags[key].Set(val)
|
||||
}
|
||||
if len(set.NetDeleteTags) > 0 {
|
||||
for _, t := range set.NetDeleteTags {
|
||||
keyval := strings.SplitN(t, "=", 1)
|
||||
key := keyval[0]
|
||||
if _, ok := n.NetDevs[set.Netname].Tags[key]; !ok {
|
||||
wwlog.Printf(wwlog.WARN, "Node: %s:%s Key %s does not exist\n", n.Id.Get(), set.Netname, key)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
}
|
||||
if len(set.NetDeleteTags) > 0 {
|
||||
for _, t := range set.NetDeleteTags {
|
||||
keyval := strings.SplitN(t, "=", 1)
|
||||
key := keyval[0]
|
||||
if _, ok := n.NetDevs[set.Netname].Tags[key]; !ok {
|
||||
wwlog.Printf(wwlog.WARN, "Node: %s:%s Key %s does not exist\n", n.Id.Get(), set.Netname, key)
|
||||
os.Exit(1)
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Deleting Tag %s\n", n.Id.Get(), set.Netname, key)
|
||||
delete(n.NetDevs[set.Netname].Tags, key)
|
||||
}
|
||||
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s:%s, Deleting Tag %s\n", n.Id.Get(), set.Netname, key)
|
||||
delete(n.NetDevs[set.Netname].Tags, key)
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
err := nodeDB.NodeUpdate(n)
|
||||
if err != nil {
|
||||
wwlog.Printf(wwlog.ERROR, "%s\n", err)
|
||||
|
||||
@@ -157,46 +157,14 @@ message NodeDeleteParameter {
|
||||
// NodeSetParameter contains all fields for updating aspects of nodes managed
|
||||
// by Warewulf.
|
||||
message NodeSetParameter {
|
||||
string comment = 1;
|
||||
map<string,string > optionsStrMap = 1;
|
||||
string container = 2;
|
||||
string kernelOverride = 3;
|
||||
string kernelArgs = 4;
|
||||
string netname = 5;
|
||||
string netdev = 6;
|
||||
string ipaddr = 7;
|
||||
string netmask = 8;
|
||||
string gateway = 9;
|
||||
string hwaddr = 10;
|
||||
string type = 11;
|
||||
string onboot = 12;
|
||||
string netDefault = 13;
|
||||
bool netdevDelete = 14;
|
||||
string cluster = 15;
|
||||
string ipxe = 16;
|
||||
string initOverlay = 17;
|
||||
repeated string runtimeOverlay = 18;
|
||||
repeated string systemOverlay = 19;
|
||||
string ipmiIpaddr = 20;
|
||||
string ipmiNetmask = 21;
|
||||
string ipmiPort = 22;
|
||||
string ipmiGateway = 23;
|
||||
string ipmiUsername = 24;
|
||||
string ipmiPassword = 25;
|
||||
string ipmiInterface = 26;
|
||||
bool allNodes = 27;
|
||||
string profile = 28;
|
||||
repeated string profileAdd = 29;
|
||||
repeated string profileDelete = 30;
|
||||
bool force = 31;
|
||||
string init = 32;
|
||||
bool discoverable = 33;
|
||||
bool undiscoverable = 34;
|
||||
string root = 35;
|
||||
repeated string tags = 36;
|
||||
repeated string tagsDelete = 37;
|
||||
string assetKey = 38;
|
||||
repeated string nodeNames = 39;
|
||||
string ipmiWrite = 40;
|
||||
repeated string NetTags = 41;
|
||||
repeated string NetDeleteTags = 42;
|
||||
}
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.21.1
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.9.2
|
||||
// source: routes.proto
|
||||
|
||||
package wwapiv1
|
||||
|
||||
import (
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
@@ -1228,48 +1228,16 @@ type NodeSetParameter struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"`
|
||||
Container string `protobuf:"bytes,2,opt,name=container,proto3" json:"container,omitempty"`
|
||||
KernelOverride string `protobuf:"bytes,3,opt,name=kernelOverride,proto3" json:"kernelOverride,omitempty"`
|
||||
KernelArgs string `protobuf:"bytes,4,opt,name=kernelArgs,proto3" json:"kernelArgs,omitempty"`
|
||||
Netname string `protobuf:"bytes,5,opt,name=netname,proto3" json:"netname,omitempty"`
|
||||
Netdev string `protobuf:"bytes,6,opt,name=netdev,proto3" json:"netdev,omitempty"`
|
||||
Ipaddr string `protobuf:"bytes,7,opt,name=ipaddr,proto3" json:"ipaddr,omitempty"`
|
||||
Netmask string `protobuf:"bytes,8,opt,name=netmask,proto3" json:"netmask,omitempty"`
|
||||
Gateway string `protobuf:"bytes,9,opt,name=gateway,proto3" json:"gateway,omitempty"`
|
||||
Hwaddr string `protobuf:"bytes,10,opt,name=hwaddr,proto3" json:"hwaddr,omitempty"`
|
||||
Type string `protobuf:"bytes,11,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Onboot string `protobuf:"bytes,12,opt,name=onboot,proto3" json:"onboot,omitempty"`
|
||||
NetDefault string `protobuf:"bytes,13,opt,name=netDefault,proto3" json:"netDefault,omitempty"`
|
||||
NetdevDelete bool `protobuf:"varint,14,opt,name=netdevDelete,proto3" json:"netdevDelete,omitempty"`
|
||||
Cluster string `protobuf:"bytes,15,opt,name=cluster,proto3" json:"cluster,omitempty"`
|
||||
Ipxe string `protobuf:"bytes,16,opt,name=ipxe,proto3" json:"ipxe,omitempty"`
|
||||
InitOverlay string `protobuf:"bytes,17,opt,name=initOverlay,proto3" json:"initOverlay,omitempty"`
|
||||
RuntimeOverlay []string `protobuf:"bytes,18,rep,name=runtimeOverlay,proto3" json:"runtimeOverlay,omitempty"`
|
||||
SystemOverlay []string `protobuf:"bytes,19,rep,name=systemOverlay,proto3" json:"systemOverlay,omitempty"`
|
||||
IpmiIpaddr string `protobuf:"bytes,20,opt,name=ipmiIpaddr,proto3" json:"ipmiIpaddr,omitempty"`
|
||||
IpmiNetmask string `protobuf:"bytes,21,opt,name=ipmiNetmask,proto3" json:"ipmiNetmask,omitempty"`
|
||||
IpmiPort string `protobuf:"bytes,22,opt,name=ipmiPort,proto3" json:"ipmiPort,omitempty"`
|
||||
IpmiGateway string `protobuf:"bytes,23,opt,name=ipmiGateway,proto3" json:"ipmiGateway,omitempty"`
|
||||
IpmiUsername string `protobuf:"bytes,24,opt,name=ipmiUsername,proto3" json:"ipmiUsername,omitempty"`
|
||||
IpmiPassword string `protobuf:"bytes,25,opt,name=ipmiPassword,proto3" json:"ipmiPassword,omitempty"`
|
||||
IpmiInterface string `protobuf:"bytes,26,opt,name=ipmiInterface,proto3" json:"ipmiInterface,omitempty"`
|
||||
AllNodes bool `protobuf:"varint,27,opt,name=allNodes,proto3" json:"allNodes,omitempty"`
|
||||
Profile string `protobuf:"bytes,28,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
ProfileAdd []string `protobuf:"bytes,29,rep,name=profileAdd,proto3" json:"profileAdd,omitempty"`
|
||||
ProfileDelete []string `protobuf:"bytes,30,rep,name=profileDelete,proto3" json:"profileDelete,omitempty"`
|
||||
Force bool `protobuf:"varint,31,opt,name=force,proto3" json:"force,omitempty"`
|
||||
Init string `protobuf:"bytes,32,opt,name=init,proto3" json:"init,omitempty"`
|
||||
Discoverable bool `protobuf:"varint,33,opt,name=discoverable,proto3" json:"discoverable,omitempty"`
|
||||
Undiscoverable bool `protobuf:"varint,34,opt,name=undiscoverable,proto3" json:"undiscoverable,omitempty"`
|
||||
Root string `protobuf:"bytes,35,opt,name=root,proto3" json:"root,omitempty"`
|
||||
Tags []string `protobuf:"bytes,36,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
TagsDelete []string `protobuf:"bytes,37,rep,name=tagsDelete,proto3" json:"tagsDelete,omitempty"`
|
||||
AssetKey string `protobuf:"bytes,38,opt,name=assetKey,proto3" json:"assetKey,omitempty"`
|
||||
NodeNames []string `protobuf:"bytes,39,rep,name=nodeNames,proto3" json:"nodeNames,omitempty"`
|
||||
IpmiWrite string `protobuf:"bytes,40,opt,name=ipmiWrite,proto3" json:"ipmiWrite,omitempty"`
|
||||
NetTags []string `protobuf:"bytes,41,rep,name=NetTags,proto3" json:"NetTags,omitempty"`
|
||||
NetDeleteTags []string `protobuf:"bytes,42,rep,name=NetDeleteTags,proto3" json:"NetDeleteTags,omitempty"`
|
||||
OptionsStrMap map[string]string `protobuf:"bytes,1,rep,name=optionsStrMap,proto3" json:"optionsStrMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Container string `protobuf:"bytes,2,opt,name=container,proto3" json:"container,omitempty"`
|
||||
NetdevDelete bool `protobuf:"varint,14,opt,name=netdevDelete,proto3" json:"netdevDelete,omitempty"`
|
||||
AllNodes bool `protobuf:"varint,27,opt,name=allNodes,proto3" json:"allNodes,omitempty"`
|
||||
Force bool `protobuf:"varint,31,opt,name=force,proto3" json:"force,omitempty"`
|
||||
Tags []string `protobuf:"bytes,36,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
TagsDelete []string `protobuf:"bytes,37,rep,name=tagsDelete,proto3" json:"tagsDelete,omitempty"`
|
||||
NodeNames []string `protobuf:"bytes,39,rep,name=nodeNames,proto3" json:"nodeNames,omitempty"`
|
||||
NetTags []string `protobuf:"bytes,41,rep,name=NetTags,proto3" json:"NetTags,omitempty"`
|
||||
NetDeleteTags []string `protobuf:"bytes,42,rep,name=NetDeleteTags,proto3" json:"NetDeleteTags,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) Reset() {
|
||||
@@ -1304,11 +1272,11 @@ func (*NodeSetParameter) Descriptor() ([]byte, []int) {
|
||||
return file_routes_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetComment() string {
|
||||
func (x *NodeSetParameter) GetOptionsStrMap() map[string]string {
|
||||
if x != nil {
|
||||
return x.Comment
|
||||
return x.OptionsStrMap
|
||||
}
|
||||
return ""
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetContainer() string {
|
||||
@@ -1318,83 +1286,6 @@ func (x *NodeSetParameter) GetContainer() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetKernelOverride() string {
|
||||
if x != nil {
|
||||
return x.KernelOverride
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetKernelArgs() string {
|
||||
if x != nil {
|
||||
return x.KernelArgs
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetNetname() string {
|
||||
if x != nil {
|
||||
return x.Netname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetNetdev() string {
|
||||
if x != nil {
|
||||
return x.Netdev
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpaddr() string {
|
||||
if x != nil {
|
||||
return x.Ipaddr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetNetmask() string {
|
||||
if x != nil {
|
||||
return x.Netmask
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetGateway() string {
|
||||
if x != nil {
|
||||
return x.Gateway
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetHwaddr() string {
|
||||
if x != nil {
|
||||
return x.Hwaddr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetOnboot() string {
|
||||
if x != nil {
|
||||
return x.Onboot
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetNetDefault() string {
|
||||
if x != nil {
|
||||
return x.NetDefault
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetNetdevDelete() bool {
|
||||
if x != nil {
|
||||
return x.NetdevDelete
|
||||
@@ -1402,90 +1293,6 @@ func (x *NodeSetParameter) GetNetdevDelete() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetCluster() string {
|
||||
if x != nil {
|
||||
return x.Cluster
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpxe() string {
|
||||
if x != nil {
|
||||
return x.Ipxe
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetInitOverlay() string {
|
||||
if x != nil {
|
||||
return x.InitOverlay
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetRuntimeOverlay() []string {
|
||||
if x != nil {
|
||||
return x.RuntimeOverlay
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetSystemOverlay() []string {
|
||||
if x != nil {
|
||||
return x.SystemOverlay
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiIpaddr() string {
|
||||
if x != nil {
|
||||
return x.IpmiIpaddr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiNetmask() string {
|
||||
if x != nil {
|
||||
return x.IpmiNetmask
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiPort() string {
|
||||
if x != nil {
|
||||
return x.IpmiPort
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiGateway() string {
|
||||
if x != nil {
|
||||
return x.IpmiGateway
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiUsername() string {
|
||||
if x != nil {
|
||||
return x.IpmiUsername
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiPassword() string {
|
||||
if x != nil {
|
||||
return x.IpmiPassword
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiInterface() string {
|
||||
if x != nil {
|
||||
return x.IpmiInterface
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetAllNodes() bool {
|
||||
if x != nil {
|
||||
return x.AllNodes
|
||||
@@ -1493,27 +1300,6 @@ func (x *NodeSetParameter) GetAllNodes() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetProfile() string {
|
||||
if x != nil {
|
||||
return x.Profile
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetProfileAdd() []string {
|
||||
if x != nil {
|
||||
return x.ProfileAdd
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetProfileDelete() []string {
|
||||
if x != nil {
|
||||
return x.ProfileDelete
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetForce() bool {
|
||||
if x != nil {
|
||||
return x.Force
|
||||
@@ -1521,34 +1307,6 @@ func (x *NodeSetParameter) GetForce() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetInit() string {
|
||||
if x != nil {
|
||||
return x.Init
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetDiscoverable() bool {
|
||||
if x != nil {
|
||||
return x.Discoverable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetUndiscoverable() bool {
|
||||
if x != nil {
|
||||
return x.Undiscoverable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetRoot() string {
|
||||
if x != nil {
|
||||
return x.Root
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetTags() []string {
|
||||
if x != nil {
|
||||
return x.Tags
|
||||
@@ -1563,13 +1321,6 @@ func (x *NodeSetParameter) GetTagsDelete() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetAssetKey() string {
|
||||
if x != nil {
|
||||
return x.AssetKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetNodeNames() []string {
|
||||
if x != nil {
|
||||
return x.NodeNames
|
||||
@@ -1577,13 +1328,6 @@ func (x *NodeSetParameter) GetNodeNames() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetIpmiWrite() string {
|
||||
if x != nil {
|
||||
return x.IpmiWrite
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeSetParameter) GetNetTags() []string {
|
||||
if x != nil {
|
||||
return x.NetTags
|
||||
@@ -2011,177 +1755,125 @@ var file_routes_proto_rawDesc = []byte{
|
||||
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xf6, 0x09, 0x0a, 0x10,
|
||||
0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xaf, 0x03, 0x0a, 0x10,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e,
|
||||
0x65, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x73,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x65,
|
||||
0x74, 0x64, 0x65, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x65, 0x74, 0x64,
|
||||
0x65, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x70, 0x61, 0x64, 0x64, 0x72, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x69, 0x70, 0x61, 0x64, 0x64, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65,
|
||||
0x74, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74,
|
||||
0x6d, 0x61, 0x73, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x68, 0x77, 0x61, 0x64, 0x64, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x68, 0x77, 0x61, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e,
|
||||
0x62, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x6e, 0x62, 0x6f,
|
||||
0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x69, 0x70, 0x78, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x69, 0x70, 0x78, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72,
|
||||
0x6c, 0x61, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x4f,
|
||||
0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x18, 0x12, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e,
|
||||
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x18,
|
||||
0x13, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4f, 0x76, 0x65,
|
||||
0x72, 0x6c, 0x61, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x70, 0x6d, 0x69, 0x49, 0x70, 0x61, 0x64,
|
||||
0x64, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x70, 0x6d, 0x69, 0x49, 0x70,
|
||||
0x61, 0x64, 0x64, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x70, 0x6d, 0x69, 0x4e, 0x65, 0x74, 0x6d,
|
||||
0x61, 0x73, 0x6b, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x6d, 0x69, 0x4e,
|
||||
0x65, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x6d, 0x69, 0x50, 0x6f,
|
||||
0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x70, 0x6d, 0x69, 0x50, 0x6f,
|
||||
0x72, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x70, 0x6d, 0x69, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||
0x79, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x6d, 0x69, 0x47, 0x61, 0x74,
|
||||
0x65, 0x77, 0x61, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x70, 0x6d, 0x69, 0x55, 0x73, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x70, 0x6d, 0x69,
|
||||
0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x70, 0x6d, 0x69,
|
||||
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
|
||||
0x69, 0x70, 0x6d, 0x69, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d,
|
||||
0x69, 0x70, 0x6d, 0x69, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x1a, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x70, 0x6d, 0x69, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61,
|
||||
0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x1b,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72,
|
||||
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66,
|
||||
0x6f, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x20, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x63,
|
||||
0x6f, 0x76, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c,
|
||||
0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0e,
|
||||
0x75, 0x6e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x22,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x75, 0x6e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x23, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73,
|
||||
0x18, 0x24, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
|
||||
0x74, 0x61, 0x67, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x25, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x74, 0x61, 0x67, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x61, 0x73, 0x73, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x26, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x61, 0x73, 0x73, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x27, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x70, 0x6d, 0x69, 0x57, 0x72,
|
||||
0x69, 0x74, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x70, 0x6d, 0x69, 0x57,
|
||||
0x72, 0x69, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x18,
|
||||
0x29, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x4e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x73, 0x18,
|
||||
0x2a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x4e, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x54, 0x61, 0x67, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x70, 0x61,
|
||||
0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x70, 0x61, 0x64, 0x64,
|
||||
0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x73, 0x65, 0x65, 0x6e, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x73, 0x65, 0x65, 0x6e, 0x22, 0x4a, 0x0a,
|
||||
0x12, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x79, 0x0a, 0x0f, 0x56, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x61, 0x70, 0x69, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x09, 0x61, 0x70, 0x69, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70,
|
||||
0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||
0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x77, 0x61,
|
||||
0x72, 0x65, 0x77, 0x75, 0x6c, 0x66, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x61, 0x72, 0x65, 0x77, 0x75, 0x6c, 0x66, 0x56, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa6, 0x08, 0x0a, 0x05, 0x57, 0x57, 0x41, 0x70, 0x69, 0x12, 0x73,
|
||||
0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x75, 0x69, 0x6c, 0x64,
|
||||
0x12, 0x21, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x74, 0x65, 0x72, 0x1a, 0x1f, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||
0x3a, 0x01, 0x2a, 0x12, 0x64, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x0f, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x22, 0x2e, 0x77,
|
||||
0x12, 0x53, 0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x4d, 0x61,
|
||||
0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x4d, 0x61,
|
||||
0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53,
|
||||
0x74, 0x72, 0x4d, 0x61, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
|
||||
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
||||
0x6e, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x64, 0x65,
|
||||
0x76, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x1f, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67,
|
||||
0x73, 0x18, 0x24, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x74, 0x61, 0x67, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x25, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x74, 0x61, 0x67, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x27, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x4e,
|
||||
0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x18, 0x29, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x4e, 0x65,
|
||||
0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x54, 0x61, 0x67, 0x73, 0x18, 0x2a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x4e, 0x65,
|
||||
0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x4f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x86, 0x01,
|
||||
0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x70, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x69, 0x70, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61,
|
||||
0x73, 0x74, 0x73, 0x65, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61,
|
||||
0x73, 0x74, 0x73, 0x65, 0x65, 0x6e, 0x22, 0x4a, 0x0a, 0x12, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0a,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x14, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x22, 0x79, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x69, 0x50, 0x72, 0x65, 0x66,
|
||||
0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70, 0x69, 0x50, 0x72, 0x65,
|
||||
0x66, 0x69, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x77, 0x61, 0x72, 0x65, 0x77, 0x75, 0x6c, 0x66, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x61,
|
||||
0x72, 0x65, 0x77, 0x75, 0x6c, 0x66, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa6, 0x08,
|
||||
0x0a, 0x05, 0x57, 0x57, 0x41, 0x70, 0x69, 0x12, 0x73, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x65, 0x72, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x21, 0x2e, 0x77, 0x77, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x75,
|
||||
0x69, 0x6c, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x1f, 0x2e, 0x77,
|
||||
0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
||||
0x72, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||
0x1a, 0x1f, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x61, 0x69, 0x6e, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x5f, 0x0a, 0x0d, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x0d,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x20, 0x2e,
|
||||
0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x65, 0x72, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x64, 0x0a, 0x0f,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
|
||||
0x22, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x74, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x15, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
|
||||
0x65, 0x72, 0x12, 0x70, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49,
|
||||
0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x22, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x1f, 0x2e, 0x77, 0x77, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x12, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
||||
0x72, 0x3a, 0x01, 0x2a, 0x12, 0x5f, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
||||
0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e,
|
||||
0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
|
||||
0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a,
|
||||
0x1f, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x6f, 0x77, 0x12, 0x56, 0x0a, 0x07, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x12, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
|
||||
0x65, 0x72, 0x1a, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x22, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x3a, 0x01, 0x2a, 0x12, 0x55, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x12, 0x1d, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a,
|
||||
0x2a, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x1a, 0x2e, 0x77, 0x77,
|
||||
0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
|
||||
0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x20, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x1f, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x68, 0x6f,
|
||||
0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x73, 0x68, 0x6f, 0x77, 0x12, 0x56, 0x0a, 0x07, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x12,
|
||||
0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41,
|
||||
0x64, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x1a, 0x2e, 0x77, 0x77,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12,
|
||||
0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x59, 0x0a, 0x07, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x53, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||
0x1a, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x10, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x65,
|
||||
0x74, 0x3a, 0x01, 0x2a, 0x12, 0x57, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x1c, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a,
|
||||
0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
|
||||
0x1a, 0x19, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x5a,
|
||||
0x27, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x77, 0x77, 0x61, 0x70, 0x69, 0x76, 0x31,
|
||||
0x3b, 0x77, 0x77, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x22,
|
||||
0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x55, 0x0a, 0x0a,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x77, 0x77, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
|
||||
0x79, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x2a, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12,
|
||||
0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x1a, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x59, 0x0a, 0x07, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x12, 0x1a, 0x2e,
|
||||
0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x22, 0x0b, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x57, 0x0a,
|
||||
0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x13, 0x2e, 0x77, 0x77,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x1a, 0x1c, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x77, 0x77, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x5a, 0x27, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
|
||||
0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x73, 0x2f, 0x77, 0x77, 0x61, 0x70, 0x69, 0x76, 0x31, 0x3b, 0x77, 0x77, 0x61, 0x70, 0x69, 0x76,
|
||||
0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -2196,7 +1888,7 @@ func file_routes_proto_rawDescGZIP() []byte {
|
||||
return file_routes_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_routes_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
|
||||
var file_routes_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
|
||||
var file_routes_proto_goTypes = []interface{}{
|
||||
(*ContainerBuildParameter)(nil), // 0: wwapi.v1.ContainerBuildParameter
|
||||
(*ContainerDeleteParameter)(nil), // 1: wwapi.v1.ContainerDeleteParameter
|
||||
@@ -2221,7 +1913,8 @@ var file_routes_proto_goTypes = []interface{}{
|
||||
nil, // 20: wwapi.v1.NodeInfo.NetDevsEntry
|
||||
nil, // 21: wwapi.v1.NodeInfo.TagsEntry
|
||||
nil, // 22: wwapi.v1.NodeInfo.KeysEntry
|
||||
(*emptypb.Empty)(nil), // 23: google.protobuf.Empty
|
||||
nil, // 23: wwapi.v1.NodeSetParameter.OptionsStrMapEntry
|
||||
(*empty.Empty)(nil), // 24: google.protobuf.Empty
|
||||
}
|
||||
var file_routes_proto_depIdxs = []int32{
|
||||
3, // 0: wwapi.v1.ContainerListResponse.containers:type_name -> wwapi.v1.ContainerInfo
|
||||
@@ -2258,38 +1951,39 @@ var file_routes_proto_depIdxs = []int32{
|
||||
21, // 31: wwapi.v1.NodeInfo.Tags:type_name -> wwapi.v1.NodeInfo.TagsEntry
|
||||
22, // 32: wwapi.v1.NodeInfo.Keys:type_name -> wwapi.v1.NodeInfo.KeysEntry
|
||||
11, // 33: wwapi.v1.NodeListResponse.nodes:type_name -> wwapi.v1.NodeInfo
|
||||
16, // 34: wwapi.v1.NodeStatusResponse.nodeStatus:type_name -> wwapi.v1.NodeStatus
|
||||
9, // 35: wwapi.v1.NetDev.TagsEntry.value:type_name -> wwapi.v1.NodeField
|
||||
10, // 36: wwapi.v1.NodeInfo.NetDevsEntry.value:type_name -> wwapi.v1.NetDev
|
||||
9, // 37: wwapi.v1.NodeInfo.TagsEntry.value:type_name -> wwapi.v1.NodeField
|
||||
9, // 38: wwapi.v1.NodeInfo.KeysEntry.value:type_name -> wwapi.v1.NodeField
|
||||
0, // 39: wwapi.v1.WWApi.ContainerBuild:input_type -> wwapi.v1.ContainerBuildParameter
|
||||
1, // 40: wwapi.v1.WWApi.ContainerDelete:input_type -> wwapi.v1.ContainerDeleteParameter
|
||||
2, // 41: wwapi.v1.WWApi.ContainerImport:input_type -> wwapi.v1.ContainerImportParameter
|
||||
23, // 42: wwapi.v1.WWApi.ContainerList:input_type -> google.protobuf.Empty
|
||||
5, // 43: wwapi.v1.WWApi.ContainerShow:input_type -> wwapi.v1.ContainerShowParameter
|
||||
13, // 44: wwapi.v1.WWApi.NodeAdd:input_type -> wwapi.v1.NodeAddParameter
|
||||
14, // 45: wwapi.v1.WWApi.NodeDelete:input_type -> wwapi.v1.NodeDeleteParameter
|
||||
8, // 46: wwapi.v1.WWApi.NodeList:input_type -> wwapi.v1.NodeNames
|
||||
15, // 47: wwapi.v1.WWApi.NodeSet:input_type -> wwapi.v1.NodeSetParameter
|
||||
8, // 48: wwapi.v1.WWApi.NodeStatus:input_type -> wwapi.v1.NodeNames
|
||||
23, // 49: wwapi.v1.WWApi.Version:input_type -> google.protobuf.Empty
|
||||
4, // 50: wwapi.v1.WWApi.ContainerBuild:output_type -> wwapi.v1.ContainerListResponse
|
||||
23, // 51: wwapi.v1.WWApi.ContainerDelete:output_type -> google.protobuf.Empty
|
||||
4, // 52: wwapi.v1.WWApi.ContainerImport:output_type -> wwapi.v1.ContainerListResponse
|
||||
4, // 53: wwapi.v1.WWApi.ContainerList:output_type -> wwapi.v1.ContainerListResponse
|
||||
6, // 54: wwapi.v1.WWApi.ContainerShow:output_type -> wwapi.v1.ContainerShowResponse
|
||||
12, // 55: wwapi.v1.WWApi.NodeAdd:output_type -> wwapi.v1.NodeListResponse
|
||||
23, // 56: wwapi.v1.WWApi.NodeDelete:output_type -> google.protobuf.Empty
|
||||
12, // 57: wwapi.v1.WWApi.NodeList:output_type -> wwapi.v1.NodeListResponse
|
||||
12, // 58: wwapi.v1.WWApi.NodeSet:output_type -> wwapi.v1.NodeListResponse
|
||||
17, // 59: wwapi.v1.WWApi.NodeStatus:output_type -> wwapi.v1.NodeStatusResponse
|
||||
18, // 60: wwapi.v1.WWApi.Version:output_type -> wwapi.v1.VersionResponse
|
||||
50, // [50:61] is the sub-list for method output_type
|
||||
39, // [39:50] is the sub-list for method input_type
|
||||
39, // [39:39] is the sub-list for extension type_name
|
||||
39, // [39:39] is the sub-list for extension extendee
|
||||
0, // [0:39] is the sub-list for field type_name
|
||||
23, // 34: wwapi.v1.NodeSetParameter.optionsStrMap:type_name -> wwapi.v1.NodeSetParameter.OptionsStrMapEntry
|
||||
16, // 35: wwapi.v1.NodeStatusResponse.nodeStatus:type_name -> wwapi.v1.NodeStatus
|
||||
9, // 36: wwapi.v1.NetDev.TagsEntry.value:type_name -> wwapi.v1.NodeField
|
||||
10, // 37: wwapi.v1.NodeInfo.NetDevsEntry.value:type_name -> wwapi.v1.NetDev
|
||||
9, // 38: wwapi.v1.NodeInfo.TagsEntry.value:type_name -> wwapi.v1.NodeField
|
||||
9, // 39: wwapi.v1.NodeInfo.KeysEntry.value:type_name -> wwapi.v1.NodeField
|
||||
0, // 40: wwapi.v1.WWApi.ContainerBuild:input_type -> wwapi.v1.ContainerBuildParameter
|
||||
1, // 41: wwapi.v1.WWApi.ContainerDelete:input_type -> wwapi.v1.ContainerDeleteParameter
|
||||
2, // 42: wwapi.v1.WWApi.ContainerImport:input_type -> wwapi.v1.ContainerImportParameter
|
||||
24, // 43: wwapi.v1.WWApi.ContainerList:input_type -> google.protobuf.Empty
|
||||
5, // 44: wwapi.v1.WWApi.ContainerShow:input_type -> wwapi.v1.ContainerShowParameter
|
||||
13, // 45: wwapi.v1.WWApi.NodeAdd:input_type -> wwapi.v1.NodeAddParameter
|
||||
14, // 46: wwapi.v1.WWApi.NodeDelete:input_type -> wwapi.v1.NodeDeleteParameter
|
||||
8, // 47: wwapi.v1.WWApi.NodeList:input_type -> wwapi.v1.NodeNames
|
||||
15, // 48: wwapi.v1.WWApi.NodeSet:input_type -> wwapi.v1.NodeSetParameter
|
||||
8, // 49: wwapi.v1.WWApi.NodeStatus:input_type -> wwapi.v1.NodeNames
|
||||
24, // 50: wwapi.v1.WWApi.Version:input_type -> google.protobuf.Empty
|
||||
4, // 51: wwapi.v1.WWApi.ContainerBuild:output_type -> wwapi.v1.ContainerListResponse
|
||||
24, // 52: wwapi.v1.WWApi.ContainerDelete:output_type -> google.protobuf.Empty
|
||||
4, // 53: wwapi.v1.WWApi.ContainerImport:output_type -> wwapi.v1.ContainerListResponse
|
||||
4, // 54: wwapi.v1.WWApi.ContainerList:output_type -> wwapi.v1.ContainerListResponse
|
||||
6, // 55: wwapi.v1.WWApi.ContainerShow:output_type -> wwapi.v1.ContainerShowResponse
|
||||
12, // 56: wwapi.v1.WWApi.NodeAdd:output_type -> wwapi.v1.NodeListResponse
|
||||
24, // 57: wwapi.v1.WWApi.NodeDelete:output_type -> google.protobuf.Empty
|
||||
12, // 58: wwapi.v1.WWApi.NodeList:output_type -> wwapi.v1.NodeListResponse
|
||||
12, // 59: wwapi.v1.WWApi.NodeSet:output_type -> wwapi.v1.NodeListResponse
|
||||
17, // 60: wwapi.v1.WWApi.NodeStatus:output_type -> wwapi.v1.NodeStatusResponse
|
||||
18, // 61: wwapi.v1.WWApi.Version:output_type -> wwapi.v1.VersionResponse
|
||||
51, // [51:62] is the sub-list for method output_type
|
||||
40, // [40:51] is the sub-list for method input_type
|
||||
40, // [40:40] is the sub-list for extension type_name
|
||||
40, // [40:40] is the sub-list for extension extendee
|
||||
0, // [0:40] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_routes_proto_init() }
|
||||
@@ -2533,7 +2227,7 @@ func file_routes_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_routes_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 23,
|
||||
NumMessages: 24,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
@@ -21,7 +22,6 @@ import (
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
@@ -137,7 +137,7 @@ func local_request_WWApi_ContainerImport_0(ctx context.Context, marshaler runtim
|
||||
}
|
||||
|
||||
func request_WWApi_ContainerList_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.ContainerList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
@@ -146,7 +146,7 @@ func request_WWApi_ContainerList_0(ctx context.Context, marshaler runtime.Marsha
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerList_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.ContainerList(ctx, &protoReq)
|
||||
@@ -367,7 +367,7 @@ func local_request_WWApi_NodeStatus_0(ctx context.Context, marshaler runtime.Mar
|
||||
}
|
||||
|
||||
func request_WWApi_Version_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.Version(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
@@ -376,7 +376,7 @@ func request_WWApi_Version_0(ctx context.Context, marshaler runtime.Marshaler, c
|
||||
}
|
||||
|
||||
func local_request_WWApi_Version_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.Version(ctx, &protoReq)
|
||||
@@ -396,13 +396,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerBuild", runtime.WithHTTPPathPattern("/v1/containerbuild"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerBuild", runtime.WithHTTPPathPattern("/v1/containerbuild"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerBuild_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ContainerBuild_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -420,13 +419,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerDelete", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerDelete", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerDelete_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ContainerDelete_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -444,13 +442,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerImport", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerImport", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerImport_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ContainerImport_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -468,13 +465,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerList", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerList", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerList_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ContainerList_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -492,13 +488,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerShow", runtime.WithHTTPPathPattern("/v1/containershow"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerShow", runtime.WithHTTPPathPattern("/v1/containershow"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerShow_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ContainerShow_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -516,13 +511,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeAdd", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeAdd", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_NodeAdd_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_NodeAdd_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -540,13 +534,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeDelete", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeDelete", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_NodeDelete_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_NodeDelete_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -564,13 +557,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeList", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeList", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_NodeList_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_NodeList_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -588,13 +580,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeSet", runtime.WithHTTPPathPattern("/v1/nodeset"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeSet", runtime.WithHTTPPathPattern("/v1/nodeset"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_NodeSet_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_NodeSet_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -612,13 +603,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeStatus", runtime.WithHTTPPathPattern("/v1/nodestatus"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeStatus", runtime.WithHTTPPathPattern("/v1/nodestatus"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_NodeStatus_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_NodeStatus_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -636,13 +626,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/Version", runtime.WithHTTPPathPattern("/version"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/Version", runtime.WithHTTPPathPattern("/version"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_Version_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_Version_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
@@ -699,13 +688,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerBuild", runtime.WithHTTPPathPattern("/v1/containerbuild"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerBuild", runtime.WithHTTPPathPattern("/v1/containerbuild"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerBuild_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ContainerBuild_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -720,13 +708,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerDelete", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerDelete", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerDelete_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ContainerDelete_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -741,13 +728,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerImport", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerImport", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerImport_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ContainerImport_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -762,13 +748,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerList", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerList", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerList_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ContainerList_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -783,13 +768,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerShow", runtime.WithHTTPPathPattern("/v1/containershow"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerShow", runtime.WithHTTPPathPattern("/v1/containershow"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerShow_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ContainerShow_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -804,13 +788,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeAdd", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeAdd", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_NodeAdd_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_NodeAdd_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -825,13 +808,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeDelete", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeDelete", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_NodeDelete_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_NodeDelete_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -846,13 +828,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeList", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeList", runtime.WithHTTPPathPattern("/v1/node"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_NodeList_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_NodeList_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -867,13 +848,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeSet", runtime.WithHTTPPathPattern("/v1/nodeset"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeSet", runtime.WithHTTPPathPattern("/v1/nodeset"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_NodeSet_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_NodeSet_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -888,13 +868,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeStatus", runtime.WithHTTPPathPattern("/v1/nodestatus"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeStatus", runtime.WithHTTPPathPattern("/v1/nodestatus"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_NodeStatus_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_NodeStatus_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -909,13 +888,12 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/Version", runtime.WithHTTPPathPattern("/version"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/Version", runtime.WithHTTPPathPattern("/version"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_Version_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_Version_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.1
|
||||
// - protoc v3.9.2
|
||||
// source: routes.proto
|
||||
|
||||
package wwapiv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
@@ -26,18 +26,18 @@ type WWApiClient interface {
|
||||
// ContainerBuild builds zero or more containers.
|
||||
ContainerBuild(ctx context.Context, in *ContainerBuildParameter, opts ...grpc.CallOption) (*ContainerListResponse, error)
|
||||
// ContainerDelete removes one or more container from Warewulf management.
|
||||
ContainerDelete(ctx context.Context, in *ContainerDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
ContainerDelete(ctx context.Context, in *ContainerDeleteParameter, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
// ContainerImport imports a container to Warewulf.
|
||||
ContainerImport(ctx context.Context, in *ContainerImportParameter, opts ...grpc.CallOption) (*ContainerListResponse, error)
|
||||
// ContainerList lists ContainerInfo for each container.
|
||||
ContainerList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ContainerListResponse, error)
|
||||
ContainerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ContainerListResponse, error)
|
||||
// ContainerShow lists ContainerShow for each container.
|
||||
ContainerShow(ctx context.Context, in *ContainerShowParameter, opts ...grpc.CallOption) (*ContainerShowResponse, error)
|
||||
// NodeAdd adds one or more nodes for management by Warewulf and returns
|
||||
// the added nodes. Node fields may be shimmed in per profiles.
|
||||
NodeAdd(ctx context.Context, in *NodeAddParameter, opts ...grpc.CallOption) (*NodeListResponse, error)
|
||||
// NodeDelete removes one or more nodes from Warewulf management.
|
||||
NodeDelete(ctx context.Context, in *NodeDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
NodeDelete(ctx context.Context, in *NodeDeleteParameter, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
// NodeList lists some or all nodes managed by Warewulf.
|
||||
NodeList(ctx context.Context, in *NodeNames, opts ...grpc.CallOption) (*NodeListResponse, error)
|
||||
// NodeSet updates node fields for one or more nodes.
|
||||
@@ -47,7 +47,7 @@ type WWApiClient interface {
|
||||
NodeStatus(ctx context.Context, in *NodeNames, opts ...grpc.CallOption) (*NodeStatusResponse, error)
|
||||
// Version returns the wwapi version, the api prefix, and the Warewulf
|
||||
// version. This is also useful for testing if the service is up.
|
||||
Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error)
|
||||
Version(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VersionResponse, error)
|
||||
}
|
||||
|
||||
type wWApiClient struct {
|
||||
@@ -67,8 +67,8 @@ func (c *wWApiClient) ContainerBuild(ctx context.Context, in *ContainerBuildPara
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerDelete(ctx context.Context, in *ContainerDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
func (c *wWApiClient) ContainerDelete(ctx context.Context, in *ContainerDeleteParameter, opts ...grpc.CallOption) (*empty.Empty, error) {
|
||||
out := new(empty.Empty)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerDelete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -85,7 +85,7 @@ func (c *wWApiClient) ContainerImport(ctx context.Context, in *ContainerImportPa
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ContainerListResponse, error) {
|
||||
func (c *wWApiClient) ContainerList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ContainerListResponse, error) {
|
||||
out := new(ContainerListResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerList", in, out, opts...)
|
||||
if err != nil {
|
||||
@@ -112,8 +112,8 @@ func (c *wWApiClient) NodeAdd(ctx context.Context, in *NodeAddParameter, opts ..
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) NodeDelete(ctx context.Context, in *NodeDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
func (c *wWApiClient) NodeDelete(ctx context.Context, in *NodeDeleteParameter, opts ...grpc.CallOption) (*empty.Empty, error) {
|
||||
out := new(empty.Empty)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/NodeDelete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -148,7 +148,7 @@ func (c *wWApiClient) NodeStatus(ctx context.Context, in *NodeNames, opts ...grp
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) {
|
||||
func (c *wWApiClient) Version(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*VersionResponse, error) {
|
||||
out := new(VersionResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/Version", in, out, opts...)
|
||||
if err != nil {
|
||||
@@ -164,18 +164,18 @@ type WWApiServer interface {
|
||||
// ContainerBuild builds zero or more containers.
|
||||
ContainerBuild(context.Context, *ContainerBuildParameter) (*ContainerListResponse, error)
|
||||
// ContainerDelete removes one or more container from Warewulf management.
|
||||
ContainerDelete(context.Context, *ContainerDeleteParameter) (*emptypb.Empty, error)
|
||||
ContainerDelete(context.Context, *ContainerDeleteParameter) (*empty.Empty, error)
|
||||
// ContainerImport imports a container to Warewulf.
|
||||
ContainerImport(context.Context, *ContainerImportParameter) (*ContainerListResponse, error)
|
||||
// ContainerList lists ContainerInfo for each container.
|
||||
ContainerList(context.Context, *emptypb.Empty) (*ContainerListResponse, error)
|
||||
ContainerList(context.Context, *empty.Empty) (*ContainerListResponse, error)
|
||||
// ContainerShow lists ContainerShow for each container.
|
||||
ContainerShow(context.Context, *ContainerShowParameter) (*ContainerShowResponse, error)
|
||||
// NodeAdd adds one or more nodes for management by Warewulf and returns
|
||||
// the added nodes. Node fields may be shimmed in per profiles.
|
||||
NodeAdd(context.Context, *NodeAddParameter) (*NodeListResponse, error)
|
||||
// NodeDelete removes one or more nodes from Warewulf management.
|
||||
NodeDelete(context.Context, *NodeDeleteParameter) (*emptypb.Empty, error)
|
||||
NodeDelete(context.Context, *NodeDeleteParameter) (*empty.Empty, error)
|
||||
// NodeList lists some or all nodes managed by Warewulf.
|
||||
NodeList(context.Context, *NodeNames) (*NodeListResponse, error)
|
||||
// NodeSet updates node fields for one or more nodes.
|
||||
@@ -185,7 +185,7 @@ type WWApiServer interface {
|
||||
NodeStatus(context.Context, *NodeNames) (*NodeStatusResponse, error)
|
||||
// Version returns the wwapi version, the api prefix, and the Warewulf
|
||||
// version. This is also useful for testing if the service is up.
|
||||
Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
|
||||
Version(context.Context, *empty.Empty) (*VersionResponse, error)
|
||||
mustEmbedUnimplementedWWApiServer()
|
||||
}
|
||||
|
||||
@@ -196,13 +196,13 @@ type UnimplementedWWApiServer struct {
|
||||
func (UnimplementedWWApiServer) ContainerBuild(context.Context, *ContainerBuildParameter) (*ContainerListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerBuild not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerDelete(context.Context, *ContainerDeleteParameter) (*emptypb.Empty, error) {
|
||||
func (UnimplementedWWApiServer) ContainerDelete(context.Context, *ContainerDeleteParameter) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerDelete not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerImport(context.Context, *ContainerImportParameter) (*ContainerListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerImport not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerList(context.Context, *emptypb.Empty) (*ContainerListResponse, error) {
|
||||
func (UnimplementedWWApiServer) ContainerList(context.Context, *empty.Empty) (*ContainerListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerList not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerShow(context.Context, *ContainerShowParameter) (*ContainerShowResponse, error) {
|
||||
@@ -211,7 +211,7 @@ func (UnimplementedWWApiServer) ContainerShow(context.Context, *ContainerShowPar
|
||||
func (UnimplementedWWApiServer) NodeAdd(context.Context, *NodeAddParameter) (*NodeListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NodeAdd not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) NodeDelete(context.Context, *NodeDeleteParameter) (*emptypb.Empty, error) {
|
||||
func (UnimplementedWWApiServer) NodeDelete(context.Context, *NodeDeleteParameter) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NodeDelete not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) NodeList(context.Context, *NodeNames) (*NodeListResponse, error) {
|
||||
@@ -223,7 +223,7 @@ func (UnimplementedWWApiServer) NodeSet(context.Context, *NodeSetParameter) (*No
|
||||
func (UnimplementedWWApiServer) NodeStatus(context.Context, *NodeNames) (*NodeStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NodeStatus not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error) {
|
||||
func (UnimplementedWWApiServer) Version(context.Context, *empty.Empty) (*VersionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Version not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) mustEmbedUnimplementedWWApiServer() {}
|
||||
@@ -294,7 +294,7 @@ func _WWApi_ContainerImport_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
}
|
||||
|
||||
func _WWApi_ContainerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
in := new(empty.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -306,7 +306,7 @@ func _WWApi_ContainerList_Handler(srv interface{}, ctx context.Context, dec func
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerList",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerList(ctx, req.(*emptypb.Empty))
|
||||
return srv.(WWApiServer).ContainerList(ctx, req.(*empty.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -420,7 +420,7 @@ func _WWApi_NodeStatus_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
|
||||
func _WWApi_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
in := new(empty.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -432,7 +432,7 @@ func _WWApi_Version_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
FullMethod: "/wwapi.v1.WWApi/Version",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).Version(ctx, req.(*emptypb.Empty))
|
||||
return srv.(WWApiServer).Version(ctx, req.(*empty.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
@@ -48,40 +48,41 @@ type NodeConf struct {
|
||||
Discoverable string `yaml:"discoverable,omitempty" lopt:"discoverable" comment:"Make discoverable in given network (yes/no)"`
|
||||
Profiles []string `yaml:"profiles,omitempty" lopt:"profile" sopt:"P" comment:"Set the node's profile members (comma separated)"`
|
||||
NetDevs map[string]*NetDevs `yaml:"network devices,omitempty"`
|
||||
Tags map[string]string `yaml:"tags,omitempty"`
|
||||
Tags map[string]string `yaml:"tags,omitempty" lopt:"keys" comment:"base key"`
|
||||
Keys map[string]string `yaml:"keys,omitempty"` // Reverse compatibility
|
||||
}
|
||||
|
||||
type IpmiConf struct {
|
||||
UserName string `yaml:"username,omitempty" lopt:"ipmiuser" comment:"Set the IPMI username"`
|
||||
Password string `yaml:"password,omitempty" lopt:"ipmipass" comment:"Set the IPMI password"`
|
||||
Ipaddr string `yaml:"ipaddr,omitempty" lopt:"ipmiaddr" comment:"Set the IPMI IP address"`
|
||||
Netmask string `yaml:"netmask,omitempty" lopt:"ipminetmask" comment:"Set the IPMI netmask"`
|
||||
Port string `yaml:"port,omitempty" lopt:"ipmiport" comment:"Set the IPMI port"`
|
||||
Gateway string `yaml:"gateway,omitempty" lopt:"ipmigateway" comment:"Set the IPMI gateway"`
|
||||
Interface string `yaml:"interface,omitempty" lopt:"ipmiinterface" comment:"Set the node's IPMI interface (defaults: 'lan')"`
|
||||
Write bool `yaml:"write,omitempty" lopt:"ipmiwrite" comment:"Enable the write of impi configuration (yes/no)"`
|
||||
UserName string `yaml:"username,omitempty" lopt:"ipmiuser" comment:"Set the IPMI username"`
|
||||
Password string `yaml:"password,omitempty" lopt:"ipmipass" comment:"Set the IPMI password"`
|
||||
Ipaddr string `yaml:"ipaddr,omitempty" lopt:"ipmiaddr" comment:"Set the IPMI IP address"`
|
||||
Netmask string `yaml:"netmask,omitempty" lopt:"ipminetmask" comment:"Set the IPMI netmask"`
|
||||
Port string `yaml:"port,omitempty" lopt:"ipmiport" comment:"Set the IPMI port"`
|
||||
Gateway string `yaml:"gateway,omitempty" lopt:"ipmigateway" comment:"Set the IPMI gateway"`
|
||||
Interface string `yaml:"interface,omitempty" lopt:"ipmiinterface" comment:"Set the node's IPMI interface (defaults: 'lan')"`
|
||||
Write bool `yaml:"write,omitempty" lopt:"ipmiwrite" comment:"Enable the write of impi configuration (yes/no)"`
|
||||
Tags map[string]string `yaml:"tags,omitempty" lopt:"impitag" comment:"ipmi keys"`
|
||||
}
|
||||
type KernelConf struct {
|
||||
Version string `yaml:"version,omitempty lopt:"kerneloverride" sopt:"K" comment:"Set kernel override version`
|
||||
Override string `yaml:"override,omitempty"`
|
||||
Version string `yaml:"version,omitempty"`
|
||||
Override string `yaml:"override,omitempty" lopt:"kerneloverride" sopt:"K" comment:"Set kernel override version"`
|
||||
Args string `yaml:"args,omitempty" lopt:"kernelargs" sopt:"A" comment:"Set Kernel argument"`
|
||||
}
|
||||
|
||||
type NetDevs struct {
|
||||
Type string `yaml:"type,omitempty" lopt:"type" sopt:"T" comment:"Set device type of given network"`
|
||||
OnBoot string `yaml:"onboot,omitempty" lopt:"onboot" comment:"Enable/disable network device (yes/no)")`
|
||||
OnBoot string `yaml:"onboot,omitempty" lopt:"onboot" comment:"Enable/disable network device (yes/no)"`
|
||||
Device string `yaml:"device,omitempty" lopt:"netdev" sopt:"N" comment:"Set the device for given network"`
|
||||
Hwaddr string `yaml:"hwaddr,omitempty" lopt:"hwaddr" sopt:"H" comment:"Set the device's HW address for given network`
|
||||
Hwaddr string `yaml:"hwaddr,omitempty" lopt:"hwaddr" sopt:"H" comment:"Set the device's HW address for given network"`
|
||||
Ipaddr string `yaml:"ipaddr,omitempty" comment:"IPv4 address in given network" sopt:"I" lopt:"ipaddr"`
|
||||
IpCIDR string `yaml:"ipcidr,omitempty"`
|
||||
Ipaddr6 string `yaml:"ip6addr,omitempty"`
|
||||
Ipaddr6 string `yaml:"ip6addr,omitempty" lopt:"ipaddr6" comment:"IPv6 address"`
|
||||
Prefix string `yaml:"prefix,omitempty"`
|
||||
Netmask string `yaml:"netmask,omitempty" lopt:"netmask" sopt:"M" comment:"Set the networks netmask"`
|
||||
Gateway string `yaml:"gateway,omitempty" lopt:"gateway" sopt:"G" comment:"Set the node's network device gateway"`
|
||||
Primary string `yaml:"primary,omitempty" lopt:"primary" comment:"Enable/disable network device as primary (yes/no)")`
|
||||
Primary string `yaml:"primary,omitempty" lopt:"primary" comment:"Enable/disable network device as primary (yes/no)"`
|
||||
Default string `yaml:"default,omitempty"` /* backward compatibility */
|
||||
Tags map[string]string `yaml:"tags,omitempty"`
|
||||
Tags map[string]string `yaml:"tags,omitempty" lopt:"nettag" comment:"network keys"`
|
||||
}
|
||||
|
||||
/******
|
||||
@@ -135,6 +136,7 @@ type IpmiEntry struct {
|
||||
Password Entry
|
||||
Interface Entry
|
||||
Write Entry
|
||||
Tags map[string]*Entry
|
||||
}
|
||||
|
||||
type KernelEntry struct {
|
||||
|
||||
@@ -324,46 +324,104 @@ func SetEntry(entryPtr interface{}, val interface{}) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
Add an entry in a map
|
||||
*/
|
||||
func AddEntry(entryMapInt interface{}, val interface{}) {
|
||||
if reflect.TypeOf(entryMapInt) == reflect.TypeOf((map[string]*Entry)(nil)) {
|
||||
entryMap := entryMapInt.(map[string]*Entry)
|
||||
str, ok := (val).(string)
|
||||
if !ok {
|
||||
panic("AddEntry must be called with string value")
|
||||
}
|
||||
for _, token := range strings.Split(str, ",") {
|
||||
keyVal := strings.Split(token, "=")
|
||||
if len(keyVal) == 2 {
|
||||
_, mapOk := entryMap[keyVal[0]]
|
||||
if !mapOk {
|
||||
var entr Entry
|
||||
entryMap[keyVal[0]] = &entr
|
||||
}
|
||||
entryMap[keyVal[0]].Set(keyVal[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Del an entry in a map
|
||||
*/
|
||||
func DelEntry(entryMapInt interface{}, val interface{}) {
|
||||
if reflect.TypeOf(entryMapInt) == reflect.TypeOf((map[string]*Entry)(nil)) {
|
||||
entryMap := entryMapInt.(map[string]*Entry)
|
||||
str, ok := (val).(string)
|
||||
if !ok {
|
||||
panic("DelEntry must be called with string value")
|
||||
}
|
||||
for _, token := range strings.Split(str, ",") {
|
||||
delete(entryMap, token)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
Call SetEntry for given field (NodeInfo)
|
||||
*/
|
||||
func (node *NodeInfo) SetField(fieldName string, val interface{}) {
|
||||
field := reflect.ValueOf(node).Elem().FieldByName(fieldName)
|
||||
fmt.Println("On field:", fieldName)
|
||||
if field.IsValid() {
|
||||
if field.Addr().Type() == reflect.TypeOf((*Entry)(nil)) {
|
||||
//fmt.Println(reflect.TypeOf(field.Addr().Interface()))
|
||||
SetEntry(field.Addr().Interface(), val)
|
||||
} else if field.Addr().Kind() == reflect.Map {
|
||||
fmt.Println(field.Addr())
|
||||
} else {
|
||||
fmt.Println("Not working field.Addr().Kind():", field.Addr().Kind())
|
||||
// is most likely NetDevEntry, ignore it
|
||||
}
|
||||
} else {
|
||||
fieldNames := strings.Split(fieldName, ".")
|
||||
if len(fieldNames) >= 2 {
|
||||
nestedField := reflect.ValueOf(node).Elem().FieldByName(fieldNames[0])
|
||||
if nestedField.IsValid() {
|
||||
switch nestedField.Addr().Type() {
|
||||
case reflect.TypeOf((**KernelEntry)(nil)):
|
||||
entry := nestedField.Addr().Interface().(**KernelEntry)
|
||||
(*entry).SetField(fieldNames[1], val)
|
||||
case reflect.TypeOf((**IpmiEntry)(nil)):
|
||||
entry := nestedField.Addr().Interface().(**IpmiEntry)
|
||||
(*entry).SetField(fieldNames[1], val)
|
||||
case reflect.TypeOf((*map[string]*NetDevEntry)(nil)):
|
||||
if len(fieldNames) == 3 {
|
||||
entryMap := nestedField.Addr().Interface().(*map[string]*NetDevEntry)
|
||||
if myVal, ok := (*entryMap)[fieldNames[1]]; ok {
|
||||
myVal.SetField(fieldNames[2], val)
|
||||
} else {
|
||||
var newEntry NetDevEntry
|
||||
(*entryMap)[fieldNames[1]] = &newEntry
|
||||
newEntry.SetField(fieldNames[2], val)
|
||||
}
|
||||
if fieldNames[0] == "del" || fieldNames[0] == "add" {
|
||||
fieldMap := reflect.ValueOf(node).Elem().FieldByName(fieldNames[1])
|
||||
if fieldMap.IsValid() {
|
||||
if fieldNames[0] == "del" {
|
||||
DelEntry(fieldMap.Addr().Elem().Interface(), val)
|
||||
} else if fieldNames[0] == "add" {
|
||||
AddEntry(fieldMap.Addr().Elem().Interface(), val)
|
||||
}
|
||||
default:
|
||||
panic(fmt.Sprintf("not implemented type %v\n", nestedField.Addr().Type()))
|
||||
} else {
|
||||
panic(fmt.Sprintf("invalid del/add operation with name %s called, field %s does not exists\n", fieldName, fieldNames[0]))
|
||||
}
|
||||
} else {
|
||||
panic(fmt.Sprintf("field %s is not a nested type of %s", fieldNames[0], fieldName))
|
||||
nestedField := reflect.ValueOf(node).Elem().FieldByName(fieldNames[0])
|
||||
if nestedField.IsValid() {
|
||||
switch nestedField.Addr().Type() {
|
||||
case reflect.TypeOf((**KernelEntry)(nil)):
|
||||
entry := nestedField.Addr().Interface().(**KernelEntry)
|
||||
(*entry).SetField(fieldNames[1], val)
|
||||
case reflect.TypeOf((**IpmiEntry)(nil)):
|
||||
entry := nestedField.Addr().Interface().(**IpmiEntry)
|
||||
(*entry).SetField(fieldNames[1], val)
|
||||
case reflect.TypeOf((*map[string]*NetDevEntry)(nil)):
|
||||
if len(fieldNames) == 3 {
|
||||
entryMap := nestedField.Addr().Interface().(*map[string]*NetDevEntry)
|
||||
if myVal, ok := (*entryMap)[fieldNames[1]]; ok {
|
||||
myVal.SetField(fieldNames[2], val)
|
||||
} else {
|
||||
var newEntry NetDevEntry
|
||||
(*entryMap)[fieldNames[1]] = &newEntry
|
||||
newEntry.SetField(fieldNames[2], val)
|
||||
}
|
||||
}
|
||||
default:
|
||||
panic(fmt.Sprintf("not implemented type %v\n", nestedField.Addr().Type()))
|
||||
}
|
||||
} else {
|
||||
panic(fmt.Sprintf("field %s is not a nested type of %s", fieldNames[0], fieldName))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
panic(fmt.Sprintf("field %s does not exists in node.NodeInfo\n", fieldName))
|
||||
@@ -451,7 +509,6 @@ func (baseCmd *CobraCommand) CreateFlags(theStruct interface{}) map[string]*stri
|
||||
//fmt.Printf("%s: field.Kind() == %s\n", field.Name, field.Type.Kind())
|
||||
if field.Type.Kind() == reflect.Ptr {
|
||||
a := structVal.Field(i).Elem().Interface()
|
||||
fmt.Println(structVal.Field(i).Elem())
|
||||
subStruct := baseCmd.CreateFlags(a)
|
||||
for key, val := range subStruct {
|
||||
optionsMap[field.Name+"."+key] = val
|
||||
@@ -473,6 +530,17 @@ func (baseCmd *CobraCommand) CreateFlags(theStruct interface{}) map[string]*stri
|
||||
baseCmd.PersistentFlags().StringVarP(&netName,
|
||||
"netname", "n", "", "Define the network name to configure")
|
||||
}
|
||||
} else if mapType.Kind() == reflect.String {
|
||||
if field.Tag.Get("lopt") != "" {
|
||||
var addPair string
|
||||
optionsMap["add"+"."+field.Name] = &addPair
|
||||
baseCmd.PersistentFlags().StringVarP(&addPair,
|
||||
field.Tag.Get("lopt")+"add", "", "", "Add key/value pair to "+field.Tag.Get("comment"))
|
||||
var delPair string
|
||||
optionsMap["del"+"."+field.Name] = &delPair
|
||||
baseCmd.PersistentFlags().StringVarP(&delPair,
|
||||
field.Tag.Get("lopt")+"del", "", "", "Delete key/value pair to "+field.Tag.Get("comment"))
|
||||
}
|
||||
} else {
|
||||
// TODO: implement handling of string maps
|
||||
wwlog.Warn("handling of %v not implemented\n", field.Type)
|
||||
@@ -497,6 +565,7 @@ func (baseCmd *CobraCommand) CreateFlags(theStruct interface{}) map[string]*stri
|
||||
}
|
||||
|
||||
}
|
||||
fmt.Println(optionsMap)
|
||||
return optionsMap
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user