Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
bb674ca
[xcvrd] suuport for integrating y cable within xcvrd
vdahiya12 Oct 22, 2020
b9abf35
adding the missing import module
vdahiya12 Oct 22, 2020
6008651
[xcvrd] fixing python LGTM errors
vdahiya12 Oct 22, 2020
d64d761
fixing some comments
vdahiya12 Oct 29, 2020
fd0ec9f
Merge branch 'vdahiya12-new_changes_for_xcvrd'
vdahiya12 Oct 29, 2020
60c69f1
[sonic-platform-daemons] fix dependency issue on py2 wheels by correc…
vdahiya12 Dec 15, 2021
81753fe
[grpc] test grpc
vdahiya12 Mar 21, 2022
ffcaf35
add logic
vdahiya12 Apr 12, 2022
3a496fb
fix more logic
vdahiya12 Apr 21, 2022
67d9408
fix more logic
vdahiya12 Apr 22, 2022
771ca40
fix not used imports
vdahiya12 Apr 22, 2022
88eb93c
Merge branch 'master' of https://github.com/vdahiya12/sonic-platform-…
Apr 29, 2022
2d82162
fix logic
vdahiya12 Apr 29, 2022
812a768
fix pipeline
vdahiya12 Apr 29, 2022
79a37fc
Merge branch 'master' of https://github.com/azure/sonic-platform-daemons
vdahiya12 Apr 30, 2022
8bd0c88
Merge branch 'test-grpc'
vdahiya12 Apr 30, 2022
8d1007f
Merge branch 'master' into test-grpc
vdahiya12 Apr 30, 2022
51862c4
refactor
vdahiya12 Apr 30, 2022
7e12750
fix more files
vdahiya12 May 5, 2022
420c25f
fix logs
vdahiya12 May 6, 2022
23e53a9
delete file
vdahiya12 May 6, 2022
7d429ec
add logic
vdahiya12 May 8, 2022
20e655b
add more logic
vdahiya12 May 8, 2022
dc34598
fix some logic
vdahiya12 May 11, 2022
1f669c4
fix some logic
vdahiya12 May 12, 2022
337155e
fix changes
vdahiya12 May 17, 2022
3d568d2
make some more changes
vdahiya12 May 17, 2022
6327816
add stuff
vdahiya12 May 19, 2022
93174e7
remove not required file
vdahiya12 May 19, 2022
6bf9c72
fix the tests
vdahiya12 May 19, 2022
f1c24ba
fix some units
vdahiya12 May 19, 2022
075ae88
add UT
vdahiya12 May 19, 2022
3333811
add more tests
vdahiya12 May 20, 2022
efe909a
add more UT
vdahiya12 May 20, 2022
420b7ee
add more UT's
vdahiya12 May 20, 2022
b11be36
add more UT's
vdahiya12 May 20, 2022
a764408
fix some UT's
vdahiya12 May 20, 2022
ee3a7af
add more unit
vdahiya12 May 20, 2022
961d542
Merge branch 'master' of https://github.com/azure/sonic-platform-daem…
vdahiya12 May 24, 2022
10647a9
correct some logs
vdahiya12 May 25, 2022
3435b65
add serverversion rpc to proto file
vdahiya12 May 26, 2022
5892ad8
fix logic
vdahiya12 May 27, 2022
3b03325
remove debug log
vdahiya12 May 27, 2022
35f1ed2
Merge branch 'master' of https://github.com/azure/sonic-platform-daem…
vdahiya12 May 27, 2022
3aa14af
add some timeouts
vdahiya12 May 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions sonic-ycabled/proto/proto_out/linkmgr_grpc_driver.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
syntax = "proto3";

service DualToRActive {
rpc QueryAdminForwardingPortState(AdminRequest) returns (AdminReply) {}
rpc SetAdminForwardingPortState(AdminRequest) returns (AdminReply) {}
rpc QueryOperationPortState(OperationRequest) returns (OperationReply) {}
rpc QueryLinkState(LinkStateRequest) returns (LinkStateReply) {}
rpc QueryServerVersion(ServerVersionRequest) returns (ServerVersionReply) {}
}

message AdminRequest {
repeated int32 portid = 1;
repeated bool state = 2;
}

message AdminReply {
repeated int32 portid = 1;
repeated bool state = 2;
}

message OperationRequest {
repeated int32 portid = 1;
}

message OperationReply {
repeated int32 portid = 1;
repeated bool state = 2;
}

message LinkStateRequest {
repeated int32 portid = 1;
}

message LinkStateReply {
repeated int32 portid = 1;
repeated bool state = 2;
}

message ServerVersionRequest {
string version = 1;
}

message ServerVersionReply {
string version = 1;
}


Empty file.
32 changes: 30 additions & 2 deletions sonic-ycabled/setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
from setuptools import setup, find_packages
from distutils.command.build_ext import build_ext as _build_ext
import distutils.command

class GrpcTool(distutils.cmd.Command):
def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
import grpc_tools.protoc

grpc_tools.protoc.main([
'grpc_tools.protoc',
'-Iproto',
'--python_out=.',
'--grpc_python_out=.',
'proto/proto_out/linkmgr_grpc_driver.proto'
])

class BuildExtCommand (_build_ext, object):
def run(self):
self.run_command('GrpcTool')
super(BuildExtCommand, self).run()

setup(
name='sonic-ycabled',
version='1.0',
description='Y-cable configuration daemon for SONiC',
description='Y-cable and smart nic configuration daemon for SONiC',
license='Apache 2.0',
author='SONiC Team',
author_email='linuxnetdev@microsoft.com',
Expand All @@ -16,13 +41,16 @@
'ycabled = ycable.ycable:main',
]
},
cmdclass={'build_ext': BuildExtCommand,
'GrpcTool': GrpcTool},
install_requires=[
# NOTE: This package also requires swsscommon, but it is not currently installed as a wheel
'enum34; python_version < "3.4"',
'sonic-py-common',
],
setup_requires=[
'wheel'
'wheel',
'grpcio-tools'
],
tests_require=[
'pytest',
Expand Down
Loading