diff --git a/cluster/calcium/meta.go b/cluster/calcium/meta.go index 390d7deed..c0180e680 100644 --- a/cluster/calcium/meta.go +++ b/cluster/calcium/meta.go @@ -29,6 +29,10 @@ func (c *calcium) ListPodNodes(podname string) ([]*types.Node, error) { return c.store.GetNodesByPod(podname) } +func (c *calcium) ListPodNodeNames(podname string) ([]string, error) { + return c.store.GetNodeNamesByPod(podname) +} + func (c *calcium) GetContainer(id string) (*types.Container, error) { return c.store.GetContainer(id) } diff --git a/cluster/cluster.go b/cluster/cluster.go index a5c551474..f205fa6fe 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -12,6 +12,7 @@ type Cluster interface { AddNode(nodename, endpoint, podname, cafile, certfile, keyfile string, public bool) (*types.Node, error) GetNode(podname, nodename string) (*types.Node, error) ListPodNodes(podname string) ([]*types.Node, error) + ListPodNodeNames(podname string) ([]string, error) GetContainer(id string) (*types.Container, error) GetContainers(ids []string) ([]*types.Container, error) diff --git a/devtools/client.py b/devtools/client.py index 94ab3b109..10a1076fd 100755 --- a/devtools/client.py +++ b/devtools/client.py @@ -95,6 +95,23 @@ def get_pod_nodes(ctx, name): click.echo(node) +@cli.command('pod:nodenames') +@click.argument('name') +@click.pass_context +def get_pod_node_names(ctx, name): + stub = _get_stub(ctx) + opts = pb.ListNodesOptions(podname=name) + + try: + r = stub.ListPodNodeNames(opts, 5) + except AbortionError as e: + click.echo(click.style('abortion error: %s' % e.details, fg='red', bold=True)) + ctx.exit(-1) + + for name in r.names: + click.echo(name) + + @cli.command('node:get') @click.argument('podname') @click.argument('nodename') diff --git a/devtools/core_pb2.py b/devtools/core_pb2.py index 8b9c088d3..ad9b294ff 100644 --- a/devtools/core_pb2.py +++ b/devtools/core_pb2.py @@ -19,7 +19,7 @@ name='core.proto', package='pb', syntax='proto3', - serialized_pb=_b('\n\ncore.proto\x12\x02pb\"\x07\n\x05\x45mpty\"!\n\x03Pod\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x65sc\x18\x02 \x01(\t\"\x1d\n\x04Pods\x12\x15\n\x04pods\x18\x01 \x03(\x0b\x32\x07.pb.Pod\"\xa1\x01\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07podname\x18\x03 \x01(\t\x12\x0e\n\x06public\x18\x04 \x01(\x08\x12\x1e\n\x03\x63pu\x18\x05 \x03(\x0b\x32\x11.pb.Node.CpuEntry\x12\x0c\n\x04info\x18\x06 \x01(\t\x1a*\n\x08\x43puEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\" \n\x05Nodes\x12\x17\n\x05nodes\x18\x01 \x03(\x0b\x32\x08.pb.Node\"V\n\tContainer\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07podname\x18\x02 \x01(\t\x12\x10\n\x08nodename\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0c\n\x04info\x18\x05 \x01(\t\"/\n\nContainers\x12!\n\ncontainers\x18\x01 \x03(\x0b\x32\r.pb.Container\"\x19\n\x0b\x43ontainerID\x12\n\n\x02id\x18\x01 \x01(\t\",\n\x0c\x43ontainerIDs\x12\x1c\n\x03ids\x18\x01 \x03(\x0b\x32\x0f.pb.ContainerID\"+\n\rAddPodOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x65sc\x18\x02 \x01(\t\"\x1d\n\rGetPodOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x88\x01\n\x0e\x41\x64\x64NodeOptions\x12\x10\n\x08nodename\x18\x01 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07podname\x18\x03 \x01(\t\x12\x0e\n\x06\x63\x61\x66ile\x18\x04 \x01(\t\x12\x10\n\x08\x63\x65rtfile\x18\x05 \x01(\t\x12\x0f\n\x07keyfile\x18\x06 \x01(\t\x12\x0e\n\x06public\x18\x07 \x01(\x08\"3\n\x0eGetNodeOptions\x12\x0f\n\x07podname\x18\x01 \x01(\t\x12\x10\n\x08nodename\x18\x02 \x01(\t\"#\n\x10ListNodesOptions\x12\x0f\n\x07podname\x18\x01 \x01(\t\"Q\n\x11\x42uildImageOptions\x12\x0c\n\x04repo\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03uid\x18\x03 \x01(\t\x12\x10\n\x08\x61rtifact\x18\x04 \x01(\t\"\xa5\x02\n\rDeployOptions\x12\r\n\x05specs\x18\x01 \x01(\t\x12\x0f\n\x07\x61ppname\x18\x02 \x01(\t\x12\r\n\x05image\x18\x03 \x01(\t\x12\x0f\n\x07podname\x18\x04 \x01(\t\x12\x10\n\x08nodename\x18\x05 \x01(\t\x12\x12\n\nentrypoint\x18\x06 \x01(\t\x12\x11\n\tcpu_quota\x18\x07 \x01(\x01\x12\r\n\x05\x63ount\x18\x08 \x01(\x05\x12\x0e\n\x06memory\x18\t \x01(\x03\x12\x0b\n\x03\x65nv\x18\n \x03(\t\x12\x31\n\x08networks\x18\x0b \x03(\x0b\x32\x1f.pb.DeployOptions.NetworksEntry\x12\x0b\n\x03raw\x18\x0c \x01(\x08\x1a/\n\rNetworksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0eUpgradeOptions\x12\x1c\n\x03ids\x18\x01 \x03(\x0b\x32\x0f.pb.ContainerID\x12\r\n\x05image\x18\x02 \x01(\t\"G\n\x12RemoveImageOptions\x12\x0f\n\x07podname\x18\x01 \x01(\t\x12\x10\n\x08nodename\x18\x02 \x01(\t\x12\x0e\n\x06images\x18\x03 \x03(\t\",\n\x0b\x45rrorDetail\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x03\x12\x0f\n\x07message\x18\x02 \x01(\t\"{\n\x11\x42uildImageMessage\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x10\n\x08progress\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\x12\x0e\n\x06stream\x18\x04 \x01(\t\x12%\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x0f.pb.ErrorDetail\"\xd3\x01\n\x16\x43reateContainerMessage\x12\x0f\n\x07podname\x18\x01 \x01(\t\x12\x10\n\x08nodename\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\r\n\x05\x65rror\x18\x05 \x01(\t\x12\x0f\n\x07success\x18\x06 \x01(\x08\x12\x30\n\x03\x63pu\x18\x07 \x03(\x0b\x32#.pb.CreateContainerMessage.CpuEntry\x1a*\n\x08\x43puEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"F\n\x12RemoveImageMessage\x12\r\n\x05image\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x10\n\x08messages\x18\x03 \x03(\t\"F\n\x16RemoveContainerMessage\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x0f\n\x07message\x18\x03 \x01(\t\"g\n\x17UpgradeContainerMessage\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06new_id\x18\x02 \x01(\t\x12\x10\n\x08new_name\x18\x03 \x01(\t\x12\r\n\x05\x65rror\x18\x04 \x01(\t\x12\x0f\n\x07success\x18\x05 \x01(\x08\x32\xbb\x05\n\x07\x43oreRPC\x12!\n\x08ListPods\x12\t.pb.Empty\x1a\x08.pb.Pods\"\x00\x12&\n\x06\x41\x64\x64Pod\x12\x11.pb.AddPodOptions\x1a\x07.pb.Pod\"\x00\x12&\n\x06GetPod\x12\x11.pb.GetPodOptions\x1a\x07.pb.Pod\"\x00\x12)\n\x07\x41\x64\x64Node\x12\x12.pb.AddNodeOptions\x1a\x08.pb.Node\"\x00\x12)\n\x07GetNode\x12\x12.pb.GetNodeOptions\x1a\x08.pb.Node\"\x00\x12\x31\n\x0cListPodNodes\x12\x14.pb.ListNodesOptions\x1a\t.pb.Nodes\"\x00\x12\x30\n\x0cGetContainer\x12\x0f.pb.ContainerID\x1a\r.pb.Container\"\x00\x12\x33\n\rGetContainers\x12\x10.pb.ContainerIDs\x1a\x0e.pb.Containers\"\x00\x12>\n\nBuildImage\x12\x15.pb.BuildImageOptions\x1a\x15.pb.BuildImageMessage\"\x00\x30\x01\x12\x42\n\x0f\x43reateContainer\x12\x11.pb.DeployOptions\x1a\x1a.pb.CreateContainerMessage0\x01\x12\x45\n\x10UpgradeContainer\x12\x12.pb.UpgradeOptions\x1a\x1b.pb.UpgradeContainerMessage0\x01\x12\x41\n\x0fRemoveContainer\x12\x10.pb.ContainerIDs\x1a\x1a.pb.RemoveContainerMessage0\x01\x12?\n\x0bRemoveImage\x12\x16.pb.RemoveImageOptions\x1a\x16.pb.RemoveImageMessage0\x01\x62\x06proto3') + serialized_pb=_b('\n\ncore.proto\x12\x02pb\"\x07\n\x05\x45mpty\"!\n\x03Pod\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x65sc\x18\x02 \x01(\t\"\x1d\n\x04Pods\x12\x15\n\x04pods\x18\x01 \x03(\x0b\x32\x07.pb.Pod\"\xa1\x01\n\x04Node\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07podname\x18\x03 \x01(\t\x12\x0e\n\x06public\x18\x04 \x01(\x08\x12\x1e\n\x03\x63pu\x18\x05 \x03(\x0b\x32\x11.pb.Node.CpuEntry\x12\x0c\n\x04info\x18\x06 \x01(\t\x1a*\n\x08\x43puEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\" \n\x05Nodes\x12\x17\n\x05nodes\x18\x01 \x03(\x0b\x32\x08.pb.Node\"\x1a\n\tNodeNames\x12\r\n\x05names\x18\x01 \x03(\t\"V\n\tContainer\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07podname\x18\x02 \x01(\t\x12\x10\n\x08nodename\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x0c\n\x04info\x18\x05 \x01(\t\"/\n\nContainers\x12!\n\ncontainers\x18\x01 \x03(\x0b\x32\r.pb.Container\"\x19\n\x0b\x43ontainerID\x12\n\n\x02id\x18\x01 \x01(\t\",\n\x0c\x43ontainerIDs\x12\x1c\n\x03ids\x18\x01 \x03(\x0b\x32\x0f.pb.ContainerID\"+\n\rAddPodOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x65sc\x18\x02 \x01(\t\"\x1d\n\rGetPodOptions\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x88\x01\n\x0e\x41\x64\x64NodeOptions\x12\x10\n\x08nodename\x18\x01 \x01(\t\x12\x10\n\x08\x65ndpoint\x18\x02 \x01(\t\x12\x0f\n\x07podname\x18\x03 \x01(\t\x12\x0e\n\x06\x63\x61\x66ile\x18\x04 \x01(\t\x12\x10\n\x08\x63\x65rtfile\x18\x05 \x01(\t\x12\x0f\n\x07keyfile\x18\x06 \x01(\t\x12\x0e\n\x06public\x18\x07 \x01(\x08\"3\n\x0eGetNodeOptions\x12\x0f\n\x07podname\x18\x01 \x01(\t\x12\x10\n\x08nodename\x18\x02 \x01(\t\"#\n\x10ListNodesOptions\x12\x0f\n\x07podname\x18\x01 \x01(\t\"Q\n\x11\x42uildImageOptions\x12\x0c\n\x04repo\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0b\n\x03uid\x18\x03 \x01(\t\x12\x10\n\x08\x61rtifact\x18\x04 \x01(\t\"\xa5\x02\n\rDeployOptions\x12\r\n\x05specs\x18\x01 \x01(\t\x12\x0f\n\x07\x61ppname\x18\x02 \x01(\t\x12\r\n\x05image\x18\x03 \x01(\t\x12\x0f\n\x07podname\x18\x04 \x01(\t\x12\x10\n\x08nodename\x18\x05 \x01(\t\x12\x12\n\nentrypoint\x18\x06 \x01(\t\x12\x11\n\tcpu_quota\x18\x07 \x01(\x01\x12\r\n\x05\x63ount\x18\x08 \x01(\x05\x12\x0e\n\x06memory\x18\t \x01(\x03\x12\x0b\n\x03\x65nv\x18\n \x03(\t\x12\x31\n\x08networks\x18\x0b \x03(\x0b\x32\x1f.pb.DeployOptions.NetworksEntry\x12\x0b\n\x03raw\x18\x0c \x01(\x08\x1a/\n\rNetworksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"=\n\x0eUpgradeOptions\x12\x1c\n\x03ids\x18\x01 \x03(\x0b\x32\x0f.pb.ContainerID\x12\r\n\x05image\x18\x02 \x01(\t\"G\n\x12RemoveImageOptions\x12\x0f\n\x07podname\x18\x01 \x01(\t\x12\x10\n\x08nodename\x18\x02 \x01(\t\x12\x0e\n\x06images\x18\x03 \x03(\t\",\n\x0b\x45rrorDetail\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x03\x12\x0f\n\x07message\x18\x02 \x01(\t\"{\n\x11\x42uildImageMessage\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x10\n\x08progress\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\x12\x0e\n\x06stream\x18\x04 \x01(\t\x12%\n\x0c\x65rror_detail\x18\x05 \x01(\x0b\x32\x0f.pb.ErrorDetail\"\xd3\x01\n\x16\x43reateContainerMessage\x12\x0f\n\x07podname\x18\x01 \x01(\t\x12\x10\n\x08nodename\x18\x02 \x01(\t\x12\n\n\x02id\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\r\n\x05\x65rror\x18\x05 \x01(\t\x12\x0f\n\x07success\x18\x06 \x01(\x08\x12\x30\n\x03\x63pu\x18\x07 \x03(\x0b\x32#.pb.CreateContainerMessage.CpuEntry\x1a*\n\x08\x43puEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"F\n\x12RemoveImageMessage\x12\r\n\x05image\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x10\n\x08messages\x18\x03 \x03(\t\"F\n\x16RemoveContainerMessage\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x0f\n\x07message\x18\x03 \x01(\t\"g\n\x17UpgradeContainerMessage\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06new_id\x18\x02 \x01(\t\x12\x10\n\x08new_name\x18\x03 \x01(\t\x12\r\n\x05\x65rror\x18\x04 \x01(\t\x12\x0f\n\x07success\x18\x05 \x01(\x08\x32\xf6\x05\n\x07\x43oreRPC\x12!\n\x08ListPods\x12\t.pb.Empty\x1a\x08.pb.Pods\"\x00\x12&\n\x06\x41\x64\x64Pod\x12\x11.pb.AddPodOptions\x1a\x07.pb.Pod\"\x00\x12&\n\x06GetPod\x12\x11.pb.GetPodOptions\x1a\x07.pb.Pod\"\x00\x12)\n\x07\x41\x64\x64Node\x12\x12.pb.AddNodeOptions\x1a\x08.pb.Node\"\x00\x12)\n\x07GetNode\x12\x12.pb.GetNodeOptions\x1a\x08.pb.Node\"\x00\x12\x31\n\x0cListPodNodes\x12\x14.pb.ListNodesOptions\x1a\t.pb.Nodes\"\x00\x12\x39\n\x10ListPodNodeNames\x12\x14.pb.ListNodesOptions\x1a\r.pb.NodeNames\"\x00\x12\x30\n\x0cGetContainer\x12\x0f.pb.ContainerID\x1a\r.pb.Container\"\x00\x12\x33\n\rGetContainers\x12\x10.pb.ContainerIDs\x1a\x0e.pb.Containers\"\x00\x12>\n\nBuildImage\x12\x15.pb.BuildImageOptions\x1a\x15.pb.BuildImageMessage\"\x00\x30\x01\x12\x42\n\x0f\x43reateContainer\x12\x11.pb.DeployOptions\x1a\x1a.pb.CreateContainerMessage0\x01\x12\x45\n\x10UpgradeContainer\x12\x12.pb.UpgradeOptions\x1a\x1b.pb.UpgradeContainerMessage0\x01\x12\x41\n\x0fRemoveContainer\x12\x10.pb.ContainerIDs\x1a\x1a.pb.RemoveContainerMessage0\x01\x12?\n\x0bRemoveImage\x12\x16.pb.RemoveImageOptions\x1a\x16.pb.RemoveImageMessage0\x01\x62\x06proto3') ) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -253,6 +253,37 @@ ) +_NODENAMES = _descriptor.Descriptor( + name='NodeNames', + full_name='pb.NodeNames', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='names', full_name='pb.NodeNames.names', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=291, + serialized_end=317, +) + + _CONTAINER = _descriptor.Descriptor( name='Container', full_name='pb.Container', @@ -307,8 +338,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=291, - serialized_end=377, + serialized_start=319, + serialized_end=405, ) @@ -338,8 +369,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=379, - serialized_end=426, + serialized_start=407, + serialized_end=454, ) @@ -369,8 +400,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=428, - serialized_end=453, + serialized_start=456, + serialized_end=481, ) @@ -400,8 +431,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=455, - serialized_end=499, + serialized_start=483, + serialized_end=527, ) @@ -438,8 +469,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=501, - serialized_end=544, + serialized_start=529, + serialized_end=572, ) @@ -469,8 +500,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=546, - serialized_end=575, + serialized_start=574, + serialized_end=603, ) @@ -542,8 +573,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=578, - serialized_end=714, + serialized_start=606, + serialized_end=742, ) @@ -580,8 +611,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=716, - serialized_end=767, + serialized_start=744, + serialized_end=795, ) @@ -611,8 +642,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=769, - serialized_end=804, + serialized_start=797, + serialized_end=832, ) @@ -663,8 +694,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=806, - serialized_end=887, + serialized_start=834, + serialized_end=915, ) @@ -701,8 +732,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1136, - serialized_end=1183, + serialized_start=1164, + serialized_end=1211, ) _DEPLOYOPTIONS = _descriptor.Descriptor( @@ -808,8 +839,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=890, - serialized_end=1183, + serialized_start=918, + serialized_end=1211, ) @@ -846,8 +877,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1185, - serialized_end=1246, + serialized_start=1213, + serialized_end=1274, ) @@ -891,8 +922,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1248, - serialized_end=1319, + serialized_start=1276, + serialized_end=1347, ) @@ -929,8 +960,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1321, - serialized_end=1365, + serialized_start=1349, + serialized_end=1393, ) @@ -988,8 +1019,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1367, - serialized_end=1490, + serialized_start=1395, + serialized_end=1518, ) @@ -1098,8 +1129,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1493, - serialized_end=1704, + serialized_start=1521, + serialized_end=1732, ) @@ -1143,8 +1174,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1706, - serialized_end=1776, + serialized_start=1734, + serialized_end=1804, ) @@ -1188,8 +1219,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1778, - serialized_end=1848, + serialized_start=1806, + serialized_end=1876, ) @@ -1247,8 +1278,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1850, - serialized_end=1953, + serialized_start=1878, + serialized_end=1981, ) _PODS.fields_by_name['pods'].message_type = _POD @@ -1268,6 +1299,7 @@ DESCRIPTOR.message_types_by_name['Pods'] = _PODS DESCRIPTOR.message_types_by_name['Node'] = _NODE DESCRIPTOR.message_types_by_name['Nodes'] = _NODES +DESCRIPTOR.message_types_by_name['NodeNames'] = _NODENAMES DESCRIPTOR.message_types_by_name['Container'] = _CONTAINER DESCRIPTOR.message_types_by_name['Containers'] = _CONTAINERS DESCRIPTOR.message_types_by_name['ContainerID'] = _CONTAINERID @@ -1331,6 +1363,13 @@ )) _sym_db.RegisterMessage(Nodes) +NodeNames = _reflection.GeneratedProtocolMessageType('NodeNames', (_message.Message,), dict( + DESCRIPTOR = _NODENAMES, + __module__ = 'core_pb2' + # @@protoc_insertion_point(class_scope:pb.NodeNames) + )) +_sym_db.RegisterMessage(NodeNames) + Container = _reflection.GeneratedProtocolMessageType('Container', (_message.Message,), dict( DESCRIPTOR = _CONTAINER, __module__ = 'core_pb2' @@ -1532,6 +1571,11 @@ def __init__(self, channel): request_serializer=ListNodesOptions.SerializeToString, response_deserializer=Nodes.FromString, ) + self.ListPodNodeNames = channel.unary_unary( + '/pb.CoreRPC/ListPodNodeNames', + request_serializer=ListNodesOptions.SerializeToString, + response_deserializer=NodeNames.FromString, + ) self.GetContainer = channel.unary_unary( '/pb.CoreRPC/GetContainer', request_serializer=ContainerID.SerializeToString, @@ -1601,6 +1645,11 @@ def ListPodNodes(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ListPodNodeNames(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetContainer(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -1669,6 +1718,11 @@ def add_CoreRPCServicer_to_server(servicer, server): request_deserializer=ListNodesOptions.FromString, response_serializer=Nodes.SerializeToString, ), + 'ListPodNodeNames': grpc.unary_unary_rpc_method_handler( + servicer.ListPodNodeNames, + request_deserializer=ListNodesOptions.FromString, + response_serializer=NodeNames.SerializeToString, + ), 'GetContainer': grpc.unary_unary_rpc_method_handler( servicer.GetContainer, request_deserializer=ContainerID.FromString, @@ -1723,6 +1777,8 @@ def GetNode(self, request, context): context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) def ListPodNodes(self, request, context): context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ListPodNodeNames(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) def GetContainer(self, request, context): context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) def GetContainers(self, request, context): @@ -1758,6 +1814,9 @@ def GetNode(self, request, timeout, metadata=None, with_call=False, protocol_opt def ListPodNodes(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() ListPodNodes.future = None + def ListPodNodeNames(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + raise NotImplementedError() + ListPodNodeNames.future = None def GetContainer(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() GetContainer.future = None @@ -1786,6 +1845,7 @@ def beta_create_CoreRPC_server(servicer, pool=None, pool_size=None, default_time ('pb.CoreRPC', 'GetContainers'): ContainerIDs.FromString, ('pb.CoreRPC', 'GetNode'): GetNodeOptions.FromString, ('pb.CoreRPC', 'GetPod'): GetPodOptions.FromString, + ('pb.CoreRPC', 'ListPodNodeNames'): ListNodesOptions.FromString, ('pb.CoreRPC', 'ListPodNodes'): ListNodesOptions.FromString, ('pb.CoreRPC', 'ListPods'): Empty.FromString, ('pb.CoreRPC', 'RemoveContainer'): ContainerIDs.FromString, @@ -1801,6 +1861,7 @@ def beta_create_CoreRPC_server(servicer, pool=None, pool_size=None, default_time ('pb.CoreRPC', 'GetContainers'): Containers.SerializeToString, ('pb.CoreRPC', 'GetNode'): Node.SerializeToString, ('pb.CoreRPC', 'GetPod'): Pod.SerializeToString, + ('pb.CoreRPC', 'ListPodNodeNames'): NodeNames.SerializeToString, ('pb.CoreRPC', 'ListPodNodes'): Nodes.SerializeToString, ('pb.CoreRPC', 'ListPods'): Pods.SerializeToString, ('pb.CoreRPC', 'RemoveContainer'): RemoveContainerMessage.SerializeToString, @@ -1816,6 +1877,7 @@ def beta_create_CoreRPC_server(servicer, pool=None, pool_size=None, default_time ('pb.CoreRPC', 'GetContainers'): face_utilities.unary_unary_inline(servicer.GetContainers), ('pb.CoreRPC', 'GetNode'): face_utilities.unary_unary_inline(servicer.GetNode), ('pb.CoreRPC', 'GetPod'): face_utilities.unary_unary_inline(servicer.GetPod), + ('pb.CoreRPC', 'ListPodNodeNames'): face_utilities.unary_unary_inline(servicer.ListPodNodeNames), ('pb.CoreRPC', 'ListPodNodes'): face_utilities.unary_unary_inline(servicer.ListPodNodes), ('pb.CoreRPC', 'ListPods'): face_utilities.unary_unary_inline(servicer.ListPods), ('pb.CoreRPC', 'RemoveContainer'): face_utilities.unary_stream_inline(servicer.RemoveContainer), @@ -1836,6 +1898,7 @@ def beta_create_CoreRPC_stub(channel, host=None, metadata_transformer=None, pool ('pb.CoreRPC', 'GetContainers'): ContainerIDs.SerializeToString, ('pb.CoreRPC', 'GetNode'): GetNodeOptions.SerializeToString, ('pb.CoreRPC', 'GetPod'): GetPodOptions.SerializeToString, + ('pb.CoreRPC', 'ListPodNodeNames'): ListNodesOptions.SerializeToString, ('pb.CoreRPC', 'ListPodNodes'): ListNodesOptions.SerializeToString, ('pb.CoreRPC', 'ListPods'): Empty.SerializeToString, ('pb.CoreRPC', 'RemoveContainer'): ContainerIDs.SerializeToString, @@ -1851,6 +1914,7 @@ def beta_create_CoreRPC_stub(channel, host=None, metadata_transformer=None, pool ('pb.CoreRPC', 'GetContainers'): Containers.FromString, ('pb.CoreRPC', 'GetNode'): Node.FromString, ('pb.CoreRPC', 'GetPod'): Pod.FromString, + ('pb.CoreRPC', 'ListPodNodeNames'): NodeNames.FromString, ('pb.CoreRPC', 'ListPodNodes'): Nodes.FromString, ('pb.CoreRPC', 'ListPods'): Pods.FromString, ('pb.CoreRPC', 'RemoveContainer'): RemoveContainerMessage.FromString, @@ -1866,6 +1930,7 @@ def beta_create_CoreRPC_stub(channel, host=None, metadata_transformer=None, pool 'GetContainers': cardinality.Cardinality.UNARY_UNARY, 'GetNode': cardinality.Cardinality.UNARY_UNARY, 'GetPod': cardinality.Cardinality.UNARY_UNARY, + 'ListPodNodeNames': cardinality.Cardinality.UNARY_UNARY, 'ListPodNodes': cardinality.Cardinality.UNARY_UNARY, 'ListPods': cardinality.Cardinality.UNARY_UNARY, 'RemoveContainer': cardinality.Cardinality.UNARY_STREAM, diff --git a/rpc/gen/core.pb.go b/rpc/gen/core.pb.go index b694cbe1d..738b1e573 100644 --- a/rpc/gen/core.pb.go +++ b/rpc/gen/core.pb.go @@ -14,6 +14,7 @@ It has these top-level messages: Pods Node Nodes + NodeNames Container Containers ContainerID @@ -128,6 +129,15 @@ func (m *Nodes) GetNodes() []*Node { return nil } +type NodeNames struct { + Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"` +} + +func (m *NodeNames) Reset() { *m = NodeNames{} } +func (m *NodeNames) String() string { return proto.CompactTextString(m) } +func (*NodeNames) ProtoMessage() {} +func (*NodeNames) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + type Container struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Podname string `protobuf:"bytes,2,opt,name=podname" json:"podname,omitempty"` @@ -139,7 +149,7 @@ type Container struct { func (m *Container) Reset() { *m = Container{} } func (m *Container) String() string { return proto.CompactTextString(m) } func (*Container) ProtoMessage() {} -func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } type Containers struct { Containers []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` @@ -148,7 +158,7 @@ type Containers struct { func (m *Containers) Reset() { *m = Containers{} } func (m *Containers) String() string { return proto.CompactTextString(m) } func (*Containers) ProtoMessage() {} -func (*Containers) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*Containers) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } func (m *Containers) GetContainers() []*Container { if m != nil { @@ -166,7 +176,7 @@ type ContainerID struct { func (m *ContainerID) Reset() { *m = ContainerID{} } func (m *ContainerID) String() string { return proto.CompactTextString(m) } func (*ContainerID) ProtoMessage() {} -func (*ContainerID) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*ContainerID) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } type ContainerIDs struct { Ids []*ContainerID `protobuf:"bytes,1,rep,name=ids" json:"ids,omitempty"` @@ -175,7 +185,7 @@ type ContainerIDs struct { func (m *ContainerIDs) Reset() { *m = ContainerIDs{} } func (m *ContainerIDs) String() string { return proto.CompactTextString(m) } func (*ContainerIDs) ProtoMessage() {} -func (*ContainerIDs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*ContainerIDs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } func (m *ContainerIDs) GetIds() []*ContainerID { if m != nil { @@ -192,7 +202,7 @@ type AddPodOptions struct { func (m *AddPodOptions) Reset() { *m = AddPodOptions{} } func (m *AddPodOptions) String() string { return proto.CompactTextString(m) } func (*AddPodOptions) ProtoMessage() {} -func (*AddPodOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*AddPodOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } type GetPodOptions struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` @@ -201,7 +211,7 @@ type GetPodOptions struct { func (m *GetPodOptions) Reset() { *m = GetPodOptions{} } func (m *GetPodOptions) String() string { return proto.CompactTextString(m) } func (*GetPodOptions) ProtoMessage() {} -func (*GetPodOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*GetPodOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } type AddNodeOptions struct { Nodename string `protobuf:"bytes,1,opt,name=nodename" json:"nodename,omitempty"` @@ -216,7 +226,7 @@ type AddNodeOptions struct { func (m *AddNodeOptions) Reset() { *m = AddNodeOptions{} } func (m *AddNodeOptions) String() string { return proto.CompactTextString(m) } func (*AddNodeOptions) ProtoMessage() {} -func (*AddNodeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*AddNodeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } type GetNodeOptions struct { Podname string `protobuf:"bytes,1,opt,name=podname" json:"podname,omitempty"` @@ -226,7 +236,7 @@ type GetNodeOptions struct { func (m *GetNodeOptions) Reset() { *m = GetNodeOptions{} } func (m *GetNodeOptions) String() string { return proto.CompactTextString(m) } func (*GetNodeOptions) ProtoMessage() {} -func (*GetNodeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*GetNodeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } type ListNodesOptions struct { Podname string `protobuf:"bytes,1,opt,name=podname" json:"podname,omitempty"` @@ -235,7 +245,7 @@ type ListNodesOptions struct { func (m *ListNodesOptions) Reset() { *m = ListNodesOptions{} } func (m *ListNodesOptions) String() string { return proto.CompactTextString(m) } func (*ListNodesOptions) ProtoMessage() {} -func (*ListNodesOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*ListNodesOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } type BuildImageOptions struct { Repo string `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"` @@ -247,7 +257,7 @@ type BuildImageOptions struct { func (m *BuildImageOptions) Reset() { *m = BuildImageOptions{} } func (m *BuildImageOptions) String() string { return proto.CompactTextString(m) } func (*BuildImageOptions) ProtoMessage() {} -func (*BuildImageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (*BuildImageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } type DeployOptions struct { Specs string `protobuf:"bytes,1,opt,name=specs" json:"specs,omitempty"` @@ -267,7 +277,7 @@ type DeployOptions struct { func (m *DeployOptions) Reset() { *m = DeployOptions{} } func (m *DeployOptions) String() string { return proto.CompactTextString(m) } func (*DeployOptions) ProtoMessage() {} -func (*DeployOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (*DeployOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func (m *DeployOptions) GetNetworks() map[string]string { if m != nil { @@ -284,7 +294,7 @@ type UpgradeOptions struct { func (m *UpgradeOptions) Reset() { *m = UpgradeOptions{} } func (m *UpgradeOptions) String() string { return proto.CompactTextString(m) } func (*UpgradeOptions) ProtoMessage() {} -func (*UpgradeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*UpgradeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } func (m *UpgradeOptions) GetIds() []*ContainerID { if m != nil { @@ -302,7 +312,7 @@ type RemoveImageOptions struct { func (m *RemoveImageOptions) Reset() { *m = RemoveImageOptions{} } func (m *RemoveImageOptions) String() string { return proto.CompactTextString(m) } func (*RemoveImageOptions) ProtoMessage() {} -func (*RemoveImageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (*RemoveImageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } type ErrorDetail struct { Code int64 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"` @@ -312,7 +322,7 @@ type ErrorDetail struct { func (m *ErrorDetail) Reset() { *m = ErrorDetail{} } func (m *ErrorDetail) String() string { return proto.CompactTextString(m) } func (*ErrorDetail) ProtoMessage() {} -func (*ErrorDetail) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (*ErrorDetail) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } type BuildImageMessage struct { Status string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` @@ -325,7 +335,7 @@ type BuildImageMessage struct { func (m *BuildImageMessage) Reset() { *m = BuildImageMessage{} } func (m *BuildImageMessage) String() string { return proto.CompactTextString(m) } func (*BuildImageMessage) ProtoMessage() {} -func (*BuildImageMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (*BuildImageMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } func (m *BuildImageMessage) GetErrorDetail() *ErrorDetail { if m != nil { @@ -347,7 +357,7 @@ type CreateContainerMessage struct { func (m *CreateContainerMessage) Reset() { *m = CreateContainerMessage{} } func (m *CreateContainerMessage) String() string { return proto.CompactTextString(m) } func (*CreateContainerMessage) ProtoMessage() {} -func (*CreateContainerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (*CreateContainerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } func (m *CreateContainerMessage) GetCpu() map[string]int64 { if m != nil { @@ -365,7 +375,7 @@ type RemoveImageMessage struct { func (m *RemoveImageMessage) Reset() { *m = RemoveImageMessage{} } func (m *RemoveImageMessage) String() string { return proto.CompactTextString(m) } func (*RemoveImageMessage) ProtoMessage() {} -func (*RemoveImageMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (*RemoveImageMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } type RemoveContainerMessage struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -376,7 +386,7 @@ type RemoveContainerMessage struct { func (m *RemoveContainerMessage) Reset() { *m = RemoveContainerMessage{} } func (m *RemoveContainerMessage) String() string { return proto.CompactTextString(m) } func (*RemoveContainerMessage) ProtoMessage() {} -func (*RemoveContainerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (*RemoveContainerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } type UpgradeContainerMessage struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` @@ -389,7 +399,7 @@ type UpgradeContainerMessage struct { func (m *UpgradeContainerMessage) Reset() { *m = UpgradeContainerMessage{} } func (m *UpgradeContainerMessage) String() string { return proto.CompactTextString(m) } func (*UpgradeContainerMessage) ProtoMessage() {} -func (*UpgradeContainerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (*UpgradeContainerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } func init() { proto.RegisterType((*Empty)(nil), "pb.Empty") @@ -397,6 +407,7 @@ func init() { proto.RegisterType((*Pods)(nil), "pb.Pods") proto.RegisterType((*Node)(nil), "pb.Node") proto.RegisterType((*Nodes)(nil), "pb.Nodes") + proto.RegisterType((*NodeNames)(nil), "pb.NodeNames") proto.RegisterType((*Container)(nil), "pb.Container") proto.RegisterType((*Containers)(nil), "pb.Containers") proto.RegisterType((*ContainerID)(nil), "pb.ContainerID") @@ -435,6 +446,7 @@ type CoreRPCClient interface { AddNode(ctx context.Context, in *AddNodeOptions, opts ...grpc.CallOption) (*Node, error) GetNode(ctx context.Context, in *GetNodeOptions, opts ...grpc.CallOption) (*Node, error) ListPodNodes(ctx context.Context, in *ListNodesOptions, opts ...grpc.CallOption) (*Nodes, error) + ListPodNodeNames(ctx context.Context, in *ListNodesOptions, opts ...grpc.CallOption) (*NodeNames, error) GetContainer(ctx context.Context, in *ContainerID, opts ...grpc.CallOption) (*Container, error) GetContainers(ctx context.Context, in *ContainerIDs, opts ...grpc.CallOption) (*Containers, error) BuildImage(ctx context.Context, in *BuildImageOptions, opts ...grpc.CallOption) (CoreRPC_BuildImageClient, error) @@ -506,6 +518,15 @@ func (c *coreRPCClient) ListPodNodes(ctx context.Context, in *ListNodesOptions, return out, nil } +func (c *coreRPCClient) ListPodNodeNames(ctx context.Context, in *ListNodesOptions, opts ...grpc.CallOption) (*NodeNames, error) { + out := new(NodeNames) + err := grpc.Invoke(ctx, "/pb.CoreRPC/ListPodNodeNames", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *coreRPCClient) GetContainer(ctx context.Context, in *ContainerID, opts ...grpc.CallOption) (*Container, error) { out := new(Container) err := grpc.Invoke(ctx, "/pb.CoreRPC/GetContainer", in, out, c.cc, opts...) @@ -693,6 +714,7 @@ type CoreRPCServer interface { AddNode(context.Context, *AddNodeOptions) (*Node, error) GetNode(context.Context, *GetNodeOptions) (*Node, error) ListPodNodes(context.Context, *ListNodesOptions) (*Nodes, error) + ListPodNodeNames(context.Context, *ListNodesOptions) (*NodeNames, error) GetContainer(context.Context, *ContainerID) (*Container, error) GetContainers(context.Context, *ContainerIDs) (*Containers, error) BuildImage(*BuildImageOptions, CoreRPC_BuildImageServer) error @@ -814,6 +836,24 @@ func _CoreRPC_ListPodNodes_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _CoreRPC_ListPodNodeNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNodesOptions) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CoreRPCServer).ListPodNodeNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.CoreRPC/ListPodNodeNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CoreRPCServer).ListPodNodeNames(ctx, req.(*ListNodesOptions)) + } + return interceptor(ctx, in, info, handler) +} + func _CoreRPC_GetContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ContainerID) if err := dec(in); err != nil { @@ -983,6 +1023,10 @@ var _CoreRPC_serviceDesc = grpc.ServiceDesc{ MethodName: "ListPodNodes", Handler: _CoreRPC_ListPodNodes_Handler, }, + { + MethodName: "ListPodNodeNames", + Handler: _CoreRPC_ListPodNodeNames_Handler, + }, { MethodName: "GetContainer", Handler: _CoreRPC_GetContainer_Handler, @@ -1025,79 +1069,81 @@ var _CoreRPC_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("core.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1171 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x57, 0xeb, 0x6e, 0xe4, 0x34, - 0x14, 0x6e, 0x26, 0x93, 0xb9, 0x9c, 0xe9, 0x6d, 0xad, 0x6e, 0x09, 0xa9, 0x58, 0xba, 0xae, 0x04, - 0x45, 0x62, 0xab, 0x6e, 0x57, 0x5c, 0x44, 0x25, 0x50, 0xb7, 0x2d, 0x55, 0x25, 0x28, 0x25, 0x12, - 0xff, 0x90, 0x4a, 0x9a, 0xb8, 0x55, 0xd4, 0x99, 0x38, 0xe4, 0xd2, 0xd1, 0x3c, 0x03, 0xbf, 0x90, - 0x78, 0x09, 0x9e, 0x81, 0x17, 0xe0, 0x15, 0x78, 0x1b, 0x74, 0x7c, 0xc9, 0xd8, 0xd9, 0x29, 0x15, - 0xfd, 0xe7, 0xcf, 0x3e, 0x39, 0xe7, 0xf8, 0xf3, 0x77, 0x7c, 0x1c, 0x80, 0x98, 0x17, 0x6c, 0x2f, - 0x2f, 0x78, 0xc5, 0x49, 0x27, 0xbf, 0xa6, 0x7d, 0xf0, 0x4e, 0x27, 0x79, 0x35, 0xa3, 0xaf, 0xc0, - 0xbd, 0xe4, 0x09, 0x21, 0xd0, 0xcd, 0xa2, 0x09, 0xf3, 0x9d, 0x6d, 0x67, 0x77, 0x18, 0x8a, 0x31, - 0xce, 0x25, 0xac, 0x8c, 0xfd, 0x8e, 0x9c, 0xc3, 0x31, 0xdd, 0x81, 0xee, 0x25, 0x4f, 0x4a, 0xb2, - 0x05, 0xdd, 0x9c, 0x27, 0xa5, 0xef, 0x6c, 0xbb, 0xbb, 0xa3, 0x83, 0xfe, 0x5e, 0x7e, 0xbd, 0x77, - 0xc9, 0x93, 0x50, 0x4c, 0xd2, 0x7f, 0x1c, 0xe8, 0x5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 0x0f, 0x60, - 0xd4, 0x2c, 0x9c, 0x9f, 0xb4, 0x33, 0xa7, 0xaf, 0x61, 0xd9, 0x58, 0x2e, 0xc9, 0x4b, 0x70, 0xd3, - 0x46, 0x07, 0x6b, 0x96, 0xdb, 0xf3, 0x93, 0x10, 0xd7, 0xe8, 0x17, 0xb0, 0x72, 0x94, 0x24, 0x97, - 0x3c, 0xf9, 0x21, 0xaf, 0x52, 0x9e, 0x95, 0xff, 0x43, 0x6c, 0x2b, 0x67, 0xac, 0xfa, 0xef, 0x0f, - 0xe9, 0xdf, 0x0e, 0xac, 0x1e, 0x25, 0x09, 0x52, 0xaf, 0xcd, 0x4c, 0x0e, 0x9d, 0x16, 0x87, 0x4f, - 0x96, 0x5f, 0x1c, 0xdd, 0xa4, 0x63, 0xcd, 0xbd, 0x42, 0xe8, 0x2d, 0x66, 0x45, 0x25, 0x56, 0xe4, - 0x09, 0x34, 0x18, 0xbd, 0xdd, 0xb1, 0x99, 0x58, 0x92, 0xc2, 0xd3, 0xd0, 0x10, 0x73, 0xdf, 0x14, - 0x33, 0xfd, 0x16, 0x56, 0xcf, 0x58, 0x65, 0xee, 0xc4, 0xc8, 0xc8, 0x79, 0x58, 0x27, 0x1d, 0x7b, - 0x8f, 0xf4, 0x53, 0x58, 0xff, 0x2e, 0x2d, 0x85, 0xa3, 0xf2, 0x51, 0x4f, 0x94, 0xc3, 0xb3, 0xb7, - 0x75, 0x3a, 0x4e, 0xce, 0x27, 0xd1, 0x2d, 0x33, 0x98, 0x2e, 0x58, 0xce, 0x35, 0xd3, 0x38, 0x46, - 0x17, 0xf7, 0xac, 0x28, 0x53, 0x9e, 0x69, 0xd1, 0x2a, 0x88, 0x05, 0x54, 0xa7, 0x89, 0x22, 0x0d, - 0x87, 0x98, 0x5e, 0x54, 0x54, 0xe9, 0x4d, 0x14, 0x57, 0x8a, 0xb2, 0x06, 0xd3, 0x3f, 0x5c, 0x58, - 0x39, 0x61, 0xf9, 0x98, 0xcf, 0x74,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 0xb8, 0xfe, 0x4e, 0x03, 0x0e, 0x5a, 0xd3, 0x4a, 0x1c, - 0x74, 0x69, 0xdf, 0x21, 0x6f, 0x61, 0xad, 0x55, 0x5c, 0x92, 0x60, 0xab, 0x6b, 0x04, 0xc1, 0xc3, - 0x45, 0xb8, 0xef, 0x90, 0x53, 0x58, 0x6f, 0xeb, 0x4f, 0x32, 0x6a, 0xb7, 0x80, 0x60, 0xcb, 0x98, - 0x5b, 0xe0, 0xe6, 0x08, 0xd6, 0x5a, 0x55, 0xb2, 0x80, 0x01, 0x91, 0xc9, 0xe2, 0x62, 0xda, 0x77, - 0xc8, 0x37, 0x30, 0x32, 0x4a, 0x99, 0x6c, 0xce, 0x8d, 0x2d, 0x3e, 0xda, 0xf3, 0x8d, 0x83, 0xeb, - 0x9e, 0xf8, 0xab, 0x79, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x9e, 0x9a, 0x15, 0xe3, - 0x0c, 0x00, 0x00, + // 1204 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x57, 0xdb, 0x4e, 0xe4, 0x46, + 0x13, 0xc6, 0xe3, 0xf1, 0x1c, 0x6a, 0x18, 0x96, 0x6d, 0xed, 0xf2, 0xfb, 0xf7, 0x2a, 0x1b, 0x68, + 0xa4, 0x84, 0x48, 0x59, 0xc4, 0xb2, 0xca, 0x11, 0x29, 0x11, 0x0b, 0x04, 0x21, 0x25, 0x84, 0x58, + 0xca, 0x5d, 0x24, 0x62, 0xec, 0x06, 0x59, 0xcc, 0xb8, 0x1d, 0xb7, 0xcd, 0x68, 0x9e, 0x21, 0x57, + 0x91, 0xf2, 0x12, 0x79, 0x93, 0xbc, 0x42, 0x5e, 0x24, 0xd7, 0x51, 0xf5, 0xc1, 0xd3, 0xf6, 0x0e, + 0x41, 0xe1, 0xae, 0xbf, 0xee, 0x72, 0x75, 0xd5,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0x46, 0x23, 0xa4, 0x89, + 0x65, 0x77, 0x3e, 0xc8, 0x32, 0x81, 0x43, 0x72, 0x00, 0x83, 0x8c, 0x95, 0x33, 0x5e, 0xdc, 0x0a, + 0x7f, 0x24, 0xaf, 0xd0, 0xfb, 0x78, 0x85, 0x1a, 0xec, 0xec, 0x9e, 0x6b, 0x0b, 0x55, 0xf4, 0xea, + 0x0f, 0xd0, 0x5d, 0x11, 0xcd, 0xfc, 0x55, 0xa9, 0x21, 0x1c, 0x06, 0x07, 0x30, 0x6e, 0x18, 0x3f, + 0x54, 0xfc, 0x86, 0x76, 0xf1, 0x3b, 0x83, 0xb5, 0x1f, 0xf3, 0x9b, 0x22, 0x5a, 0xa8, 0xef, 0xe1, + 0xbb, 0xbd, 0x38, 0x89, 0x8e, 0x75, 0x12, 0xf4, 0x0a, 0x48, 0xc8, 0xa6, 0xfc, 0x8e, 0x35, 0x34, + 0xf5, 0x28, 0x31, 0x23, 0x99, 0xd2, 0xa9, 0xf0, 0x5d, 0xc9, 0x9b, 0x46, 0xf4, 0x00, 0x46, 0x27, + 0x45, 0xc1, 0x8b, 0x63, 0x56, 0x46, 0xe9, 0x04, 0x05, 0x1b, 0xf3, 0x44, 0x79, 0x76, 0x43, 0x39, + 0xc6, 0x0d, 0xa7, 0x4c, 0x88, 0x45, 0x78, 0x06, 0xd2, 0x3f, 0x1c, 0x5b, 0xf4, 0xdf, 0xa9, 0x59, + 0xdc, 0x4a, 0x94, 0x51, 0x59, 0x19, 0x1d, 0x6a, 0x84, 0xe1, 0xe5, 0x05, 0xbf, 0x29, 0x98, 0x10, + 0x26, 0x3c, 0x83, 0x91, 0x00, 0x86, 0x61, 0x18, 0x29, 0x4a, 0xa0, 0x3c, 0x15, 0x2c, 0x9a, 0x9a, + 0x7a, 0xa1, 0x10, 0xd9, 0x87, 0x55, 0x69, 0x70, 0x99, 0xc8, 0xa8, 0xa5, 0x18, 0x35, 0xb5, 0x56, + 0x32, 0xe1, 0x88, 0x2d, 0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 0x07, + 0x57, 0x3d, 0xf9, 0xcf, 0xf4, 0xe6, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0x8d, 0x66, 0x53, + 0x41, 0x0d, 0x00, 0x00, } diff --git a/rpc/gen/core.proto b/rpc/gen/core.proto index c8488a3a7..ed3a905fb 100644 --- a/rpc/gen/core.proto +++ b/rpc/gen/core.proto @@ -10,6 +10,7 @@ service CoreRPC { rpc AddNode(AddNodeOptions) returns (Node) {}; rpc GetNode(GetNodeOptions) returns (Node) {}; rpc ListPodNodes(ListNodesOptions) returns (Nodes) {}; + rpc ListPodNodeNames(ListNodesOptions) returns (NodeNames) {}; rpc GetContainer(ContainerID) returns (Container) {}; rpc GetContainers(ContainerIDs) returns (Containers) {}; @@ -45,6 +46,10 @@ message Nodes { repeated Node nodes = 1; } +message NodeNames { + repeated string names = 1; +} + message Container { string id = 1; string podname = 2; diff --git a/rpc/rpc.go b/rpc/rpc.go index 29a272a5e..6d454f8c4 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -89,6 +89,16 @@ func (v *virbranium) ListPodNodes(ctx context.Context, opts *pb.ListNodesOptions return &pb.Nodes{Nodes: nodes}, nil } +// ListPodNodes returns a list of node names for pod, only name! +func (v *virbranium) ListPodNodeNames(ctx context.Context, opts *pb.ListNodesOptions) (*pb.NodeNames, error) { + names, err := v.cluster.ListPodNodeNames(opts.Podname) + if err != nil { + return nil, err + } + + return &pb.NodeNames{Names: names}, nil +} + // GetContainer // More information will be shown func (v *virbranium) GetContainer(ctx context.Context, id *pb.ContainerID) (*pb.Container, error) { diff --git a/store/etcd/node.go b/store/etcd/node.go index 1118e57b8..b6961d06e 100644 --- a/store/etcd/node.go +++ b/store/etcd/node.go @@ -170,6 +170,29 @@ func (k *krypton) GetNodesByPod(podname string) ([]*types.Node, error) { return nodes, err } +// only get names +// storage path in etcd is `/eru-core/pod/:podname/node` +func (k *krypton) GetNodeNamesByPod(podname string) ([]string, error) { + var ( + names []string + err error + ) + + key := fmt.Sprintf(podNodesKey, podname) + resp, err := k.etcd.Get(context.Background(), key, nil) + if err != nil { + return names, err + } + if !resp.Node.Dir { + return nil, fmt.Errorf("Node storage path %q in etcd is not a directory", key) + } + + for _, node := range resp.Node.Nodes { + names = append(names, utils.Tail(node.Key)) + } + return names, err +} + // update a node, save it to etcd // storage path in etcd is `/eru-core/pod/:podname/node/:nodename/info` func (k *krypton) UpdateNode(node *types.Node) error { diff --git a/store/store.go b/store/store.go index 24f48ea3f..4eb433680 100644 --- a/store/store.go +++ b/store/store.go @@ -15,6 +15,7 @@ type Store interface { AddNode(name, endpoint, podname, cafile, certfile, keyfile string, public bool) (*types.Node, error) GetNode(podname, nodename string) (*types.Node, error) GetNodesByPod(podname string) ([]*types.Node, error) + GetNodeNamesByPod(podname string) ([]string, error) GetAllNodes() ([]*types.Node, error) UpdateNode(*types.Node) error UpdateNodeCPU(podname, nodename string, cpu types.CPUMap, action string) error