aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c9
-rw-r--r--metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c15
-rw-r--r--metis/ccnx/forwarder/metis/core/metis_Wldr.c7
-rw-r--r--metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c5
-rw-r--r--metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c5
-rw-r--r--metis/scripts/build-package.sh10
6 files changed, 30 insertions, 21 deletions
diff --git a/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c b/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c
index 59e4c5a8..129d2dc0 100644
--- a/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c
+++ b/metis/ccnx/forwarder/metis/config/metis_ConfigurationFile.c
@@ -25,6 +25,7 @@
#include <parc/algol/parc_Object.h>
#include <parc/algol/parc_ArrayList.h>
#include <parc/algol/parc_List.h>
+#include <parc/assert/parc_Assert.h>
#include <ccnx/forwarder/metis/config/metis_ConfigurationFile.h>
#include <ccnx/forwarder/metis/config/metis_Configuration.h>
#include <ccnx/forwarder/metis/config/metis_ControlState.h>
@@ -206,8 +207,8 @@ parcObject_ImplementRelease(metisConfigurationFile, MetisConfigurationFile);
MetisConfigurationFile *
metisConfigurationFile_Create(MetisForwarder *metis, const char *filename)
{
- assertNotNull(metis, "Parameter metis must be non-null");
- assertNotNull(filename, "Parameter filename must be non-null");
+ parcAssertNotNull(metis, "Parameter metis must be non-null");
+ parcAssertNotNull(filename, "Parameter filename must be non-null");
MetisConfigurationFile *configFile = parcObject_CreateInstance(MetisConfigurationFile);
@@ -215,7 +216,7 @@ metisConfigurationFile_Create(MetisForwarder *metis, const char *filename)
configFile->linesRead = 0;
configFile->metis = metis;
configFile->filename = parcMemory_StringDuplicate(filename, strlen(filename));
- assertNotNull(configFile->filename, "Could not copy string '%s'", filename);
+ parcAssertNotNull(configFile->filename, "Could not copy string '%s'", filename);
// setup the control state for the command parser
configFile->controlState = metisControlState_Create(configFile, _writeRead);
@@ -252,7 +253,7 @@ metisConfigurationFile_Create(MetisForwarder *metis, const char *filename)
bool
metisConfigurationFile_Process(MetisConfigurationFile *configFile)
{
- assertNotNull(configFile, "Parameter configFile must be non-null");
+ parcAssertNotNull(configFile, "Parameter configFile must be non-null");
// default to a "true" return value and only set to false if we encounter an error.
bool success = true;
diff --git a/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c b/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c
index 82095882..727b2b2b 100644
--- a/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c
+++ b/metis/ccnx/forwarder/metis/content_store/metis_LRUContentStore.c
@@ -20,6 +20,7 @@
#include <parc/algol/parc_Object.h>
#include <parc/algol/parc_HashCodeTable.h>
#include <parc/algol/parc_DisplayIndented.h>
+#include <parc/assert/parc_Assert.h>
#include <ccnx/forwarder/metis/core/metis_Logger.h>
@@ -299,10 +300,10 @@ _metisLRUContentStore_PutContent(MetisContentStoreInterface *storeImpl, MetisMes
{
bool result = false;
_MetisLRUContentStore *store = (_MetisLRUContentStore *) metisContentStoreInterface_GetPrivateData(storeImpl);
- assertNotNull(store, "Parameter store must be non-null");
- assertNotNull(content, "Parameter objectMessage must be non-null");
+ parcAssertNotNull(store, "Parameter store must be non-null");
+ parcAssertNotNull(content, "Parameter objectMessage must be non-null");
- assertTrue(metisMessage_GetType(content) == MetisMessagePacketType_ContentObject,
+ parcAssertTrue(metisMessage_GetType(content) == MetisMessagePacketType_ContentObject,
"Parameter objectMessage must be a Content Object");
if (store->objectCapacity == 0) {
@@ -383,9 +384,9 @@ _metisLRUContentStore_MatchInterest(MetisContentStoreInterface *storeImpl, Metis
_MetisLRUContentStore *store = (_MetisLRUContentStore *) metisContentStoreInterface_GetPrivateData(storeImpl);
- assertNotNull(store, "Parameter store must be non-null");
- assertNotNull(interest, "Parameter interestMessage must be non-null");
- assertTrue(metisMessage_GetType(interest) == MetisMessagePacketType_Interest,
+ parcAssertNotNull(store, "Parameter store must be non-null");
+ parcAssertNotNull(interest, "Parameter interestMessage must be non-null");
+ parcAssertTrue(metisMessage_GetType(interest) == MetisMessagePacketType_Interest,
"Parameter interestMessage must be an Interest");
// This will do the most restrictive lookup.
@@ -491,7 +492,7 @@ metisLRUContentStore_Create(MetisContentStoreConfig *config, MetisLogger *logger
{
MetisContentStoreInterface *storeImpl = NULL;
- assertNotNull(logger, "MetisLRUContentStore requires a non-NULL logger");
+ parcAssertNotNull(logger, "MetisLRUContentStore requires a non-NULL logger");
storeImpl = parcObject_CreateAndClearInstance(MetisContentStoreInterface);
diff --git a/metis/ccnx/forwarder/metis/core/metis_Wldr.c b/metis/ccnx/forwarder/metis/core/metis_Wldr.c
index 6249bf0a..61029fa6 100644
--- a/metis/ccnx/forwarder/metis/core/metis_Wldr.c
+++ b/metis/ccnx/forwarder/metis/core/metis_Wldr.c
@@ -20,6 +20,7 @@
#include <ccnx/forwarder/metis/core/metis_Wldr.h>
#include <ccnx/forwarder/metis/core/metis_Forwarder.h>
#include <parc/logging/parc_LogReporterTextStdout.h>
+#include <parc/assert/parc_Assert.h>
struct metis_wldr_buffer {
MetisMessage *message;
@@ -38,12 +39,12 @@ MetisWldr *
metisWldr_Init()
{
MetisWldr *wldr = parcMemory_AllocateAndClear(sizeof(MetisWldr));
- assertNotNull(wldr, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldr));
+ parcAssertNotNull(wldr, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldr));
wldr->expected_label = 1;
wldr->next_label = 1;
for (int i = 0; i < BUFFER_SIZE; i++) {
MetisWldrBuffer *entry = parcMemory_AllocateAndClear(sizeof(MetisWldrBuffer));
- assertNotNull(entry, "WldrBuffer init: parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldrBuffer));
+ parcAssertNotNull(entry, "WldrBuffer init: parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(MetisWldrBuffer));
entry->message = NULL;
entry->rtx_counter = 0;
wldr->buffer[i] = entry;
@@ -112,7 +113,7 @@ _metisWldr_SendWldrNotificaiton(MetisWldr *wldr, const MetisConnection *conn, Me
MetisMessage *notification = metisMessage_Slice(message, 0, metisMessage_Length(message), 0, NULL);
metisMessage_SetWldrNotification(notification, expected_lbl, received_lbl);
//printf("------------send notification %u, %u\n",expected_lbl, received_lbl);
- assertNotNull(notification, "Got null from Slice");
+ parcAssertNotNull(notification, "Got null from Slice");
metisConnection_ReSend(conn, notification);
}
diff --git a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c
index 839ece06..7f39bb2d 100644
--- a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c
+++ b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopState.c
@@ -18,6 +18,7 @@
#include <parc/algol/parc_Memory.h>
#include <parc/algol/parc_Object.h>
+#include <parc/assert/parc_Assert.h>
#include <parc/algol/parc_DisplayIndented.h>
#include <ccnx/forwarder/metis/strategies/strategy_NexthopState.h>
@@ -52,7 +53,7 @@ parcObject_Override(StrategyNexthopState, PARCObject,
void
strategyNexthopState_AssertValid(const StrategyNexthopState *instance)
{
- assertTrue(strategyNexthopState_IsValid(instance),
+ parcAssertTrue(strategyNexthopState_IsValid(instance),
"StrategyNexthopState is not valid.");
}
@@ -188,7 +189,7 @@ char *
strategyNexthopState_ToString(const StrategyNexthopState *x)
{
//this is not implemented
- trapNotImplemented("strategyNexthopState_ToString is not implemented");
+ parcTrapNotImplemented("strategyNexthopState_ToString is not implemented");
return NULL;
}
diff --git a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c
index e93c5b6b..2e35968d 100644
--- a/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c
+++ b/metis/ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.c
@@ -20,6 +20,7 @@
#include <parc/algol/parc_Memory.h>
#include <parc/algol/parc_Object.h>
+#include <parc/assert/parc_Assert.h>
#include <parc/algol/parc_DisplayIndented.h>
#include <ccnx/forwarder/metis/strategies/strategy_NexthopStateWithPD.h>
@@ -55,7 +56,7 @@ parcObject_Override(StrategyNexthopStateWithPD, PARCObject,
void
strategyNexthopStateWithPD_AssertValid(const StrategyNexthopStateWithPD *instance)
{
- assertTrue(strategyNexthopStateWithPD_IsValid(instance),
+ parcAssertTrue(strategyNexthopStateWithPD_IsValid(instance),
"StrategyNexthopStateWithPD is not valid.");
}
@@ -201,7 +202,7 @@ char *
strategyNexthopStateWithPD_ToString(const StrategyNexthopStateWithPD *x)
{
//this is not implemented
- trapNotImplemented("strategyNexthopStateWithPD_ToString is not implemented");
+ parcTrapNotImplemented("strategyNexthopStateWithPD_ToString is not implemented");
return NULL;
}
diff --git a/metis/scripts/build-package.sh b/metis/scripts/build-package.sh
index f6413e39..b50c1ea7 100644
--- a/metis/scripts/build-package.sh
+++ b/metis/scripts/build-package.sh
@@ -83,18 +83,22 @@ update_fdio_repo() {
REPO_VPP_URL="${NEXUS_PROXY}/content/repositories/fd.io.stable.1701.ubuntu.xenial.main/"
REPO=${REPO_NAME:-"master.ubuntu.xenial.main"}
REPO_CICN_URL="${NEXUS_PROXY}/content/repositories/fd.io.${REPO}"
+ echo "deb ${REPO_VPP_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.list
+ echo "deb ${REPO_CICN_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.master.list
elif [ "$DISTRIB_CODENAME" == "trusty" ]; then
REPO_VPP_URL="${NEXUS_PROXY}/content/repositories/fd.io.stable.1701.ubuntu.trusty.main/"
REPO=${REPO_NAME:-"master.ubuntu.trusty.main"}
REPO_CICN_URL="${NEXUS_PROXY}/content/repositories/fd.io.${REPO}"
+ echo "deb ${REPO_VPP_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.list
+ echo "deb ${REPO_CICN_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.master.list
+ elif [ "$DISTRIB_CODENAME" == "bionic" ]; then
+ curl -s https://packagecloud.io/install/repositories/fdio/release/script.deb.sh | sudo bash
+ curl -s https://packagecloud.io/install/repositories/fdio/master/script.deb.sh | sudo bash
else
echo "Distribution $DISTRIB_CODENAME is not supported"
exit -1
fi
- echo "deb ${REPO_VPP_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.list
- echo "deb ${REPO_CICN_URL} ./" | sudo tee /etc/apt/sources.list.d/99fd.io.master.list
-
elif [ "$DISTRIB_ID" == "CentOS" ]; then
REPO_VPP_URL="${NEXUS_PROXY}/content/repositories/fd.io.centos7/"
REPO=${REPO_NAME:-"master.centos7"}