Disabled gNMI support in p4vm until it becomes more stable

Change-Id: If2085d5824a2b9d06b249bf8d82d92fd384de5af
This commit is contained in:
Carmelo Cascone 2018-02-11 17:36:42 -08:00
parent 0eb68e14ed
commit 4f985cd8c5
5 changed files with 27 additions and 20 deletions

View File

@ -83,7 +83,8 @@ class ONOSBmv2Switch(Switch):
def __init__(self, name, json=None, debugger=False, loglevel="warn",
elogger=False, grpcPort=None, cpuPort=255,
thriftPort=None, netcfg=True, dryrun=False, pipeconfId="",
pktdump=False, valgrind=False, injectPorts=False, **kwargs):
pktdump=False, valgrind=False, withGnmi=False,
injectPorts=True, **kwargs):
Switch.__init__(self, name, **kwargs)
self.grpcPort = pickUnusedPort() if not grpcPort else grpcPort
self.thriftPort = pickUnusedPort() if not thriftPort else thriftPort
@ -108,6 +109,7 @@ class ONOSBmv2Switch(Switch):
self.netcfgfile = '/tmp/bmv2-%d-netcfg.json' % self.deviceId
self.pipeconfId = pipeconfId
self.injectPorts = parseBoolean(injectPorts)
self.withGnmi = parseBoolean(withGnmi)
self.longitude = kwargs['longitude'] if 'longitude' in kwargs else None
self.latitude = kwargs['latitude'] if 'latitude' in kwargs else None
self.onosDeviceId = "device:bmv2:%d" % self.deviceId
@ -147,10 +149,6 @@ class ONOSBmv2Switch(Switch):
"port": self.grpcPort,
"deviceId": self.deviceId,
"deviceKeyId": "p4runtime:%s" % self.onosDeviceId
},
"gnmi": {
"ip": srcIP,
"port": self.grpcPort
}
},
"piPipeconf": {
@ -159,7 +157,13 @@ class ONOSBmv2Switch(Switch):
"basic": basicCfg
}
if(self.injectPorts):
if self.withGnmi:
cfgData["generalprovider"]["gnmi"] = {
"ip": srcIP,
"port": self.grpcPort
}
if self.injectPorts:
portData = {}
portId = 1
for intfName in self.intfNames():

View File

@ -88,7 +88,7 @@ To generate the OVA file, in a terminal window type the following commands:
```bash
cd $ONOS_ROOT/tools/dev/p4vm
./build-ova.sh
./export-ova.sh
```
This script will:

View File

@ -15,13 +15,11 @@ sshpass -p 'rocks' \
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
-p ${SSH_PORT} sdn@127.0.0.1 "bash /vagrant/pre-ova-cleanup.sh"
# Wait for VM to power off
sleep 10
# Make sure VM is not running
vagrant halt
sleep 5
vboxmanage controlvm ${VB_UUID} acpipowerbutton
# Wait for VM to power off
sleep 30
# Remove vagrant shared folder
vboxmanage sharedfolder remove ${VB_UUID} -name "vagrant"

View File

@ -259,12 +259,15 @@ function do_p4runtime {
git submodule update --init --recursive
./autogen.sh
./configure --with-proto --with-sysrepo 'CXXFLAGS=-O0 -g'
# FIXME: re-enable --with-sysrepo when gNMI support becomes more stable
# ./configure --with-proto --with-sysrepo 'CXXFLAGS=-O0 -g'
./configure --with-proto 'CXXFLAGS=-O0 -g'
make -j${NUM_CORES}
sudo make install
sudo ldconfig
sudo proto/sysrepo/install_yangs.sh
# FIXME: re-enable when gNMI support becomes more stable
# sudo proto/sysrepo/install_yangs.sh
}
function do_bmv2 {
@ -279,7 +282,10 @@ function do_bmv2 {
# Simple_switch_grpc target
cd targets/simple_switch_grpc
./autogen.sh
./configure --with-sysrepo --with-thrift 'CXXFLAGS=-O0 -g'
# FIXME: re-enable --with-sysrepo when gNMI support becomes more stable
# ./configure --with-sysrepo --with-thrift 'CXXFLAGS=-O0 -g'
./configure --with-thrift 'CXXFLAGS=-O0 -g'
make -j${NUM_CORES}
sudo make install
sudo ldconfig
@ -381,8 +387,9 @@ cd ${BUILD_DIR}
# In dependency order.
check_and_do ${PROTOBUF_COMMIT} protobuf do_protobuf protobuf
check_and_do ${GRPC_COMMIT} grpc do_grpc grpc
check_and_do ${LIBYANG_COMMIT} libyang do_libyang libyang
check_and_do ${SYSREPO_COMMIT} sysrepo do_sysrepo sysrepo
# FIXME: re-enable when gNMI support becomes more stable
# check_and_do ${LIBYANG_COMMIT} libyang do_libyang libyang
# check_and_do ${SYSREPO_COMMIT} sysrepo do_sysrepo sysrepo
check_and_do ${BMV2_COMMIT} bmv2 do_pi_bmv2_deps bmv2-deps
check_and_do ${PI_COMMIT} p4runtime do_p4runtime p4runtime
check_and_do ${BMV2_COMMIT} bmv2 do_bmv2 bmv2

View File

@ -16,5 +16,3 @@ rm -rf ~/p4tools/libyang/build
rm -rf ~/p4tools/sysrepo/build
cat /dev/null > ~/.bash_history
sudo poweroff