11 #ifndef GI_PLATFORM_CONFIG_HPP
12 #define GI_PLATFORM_CONFIG_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
20 #include "modelgbp/gbpe/SNATIPPool.hpp"
24 #include "modelgbp/cdp/Config.hpp"
28 #include "modelgbp/dfw/Config.hpp"
32 #include "modelgbp/domain/ConfigFromConfigRTgt.hpp"
36 #include "modelgbp/l2/Config.hpp"
40 #include "modelgbp/lacp/Config.hpp"
44 #include "modelgbp/lldp/Config.hpp"
48 #include "modelgbp/span/SrcGrp.hpp"
52 #include "modelgbp/span/DstGrp.hpp"
56 #include "modelgbp/span/LocalEp.hpp"
60 #include "modelgbp/stp/Config.hpp"
66 :
public opflex::modb::mointernal::MO
73 static const opflex::modb::class_id_t
CLASS_ID = 51;
81 return getObjectInstance().isSet(1671170ul, opflex::modb::PropertyInfo::ENUM8);
91 return (
const uint8_t)getObjectInstance().getUInt64(1671170ul);
115 getTLMutator().modify(getClassId(), getURI())->setUInt64(1671170ul, newValue);
127 getTLMutator().modify(getClassId(), getURI())->unset(1671170ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
137 return getObjectInstance().isSet(1671173ul, opflex::modb::PropertyInfo::ENUM8);
147 return (
const uint8_t)getObjectInstance().getUInt64(1671173ul);
171 getTLMutator().modify(getClassId(), getURI())->setUInt64(1671173ul, newValue);
183 getTLMutator().modify(getClassId(), getURI())->unset(1671173ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
193 return getObjectInstance().isSet(1671171ul, opflex::modb::PropertyInfo::ENUM8);
203 return (
const uint8_t)getObjectInstance().getUInt64(1671171ul);
212 const uint8_t
getMode(
const uint8_t defaultValue)
214 return getMode().get_value_or(defaultValue);
227 getTLMutator().modify(getClassId(), getURI())->setUInt64(1671171ul, newValue);
239 getTLMutator().modify(getClassId(), getURI())->unset(1671171ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
249 return getObjectInstance().isSet(1671172ul, opflex::modb::PropertyInfo::STRING);
259 return getObjectInstance().getString(1671172ul);
283 getTLMutator().modify(getClassId(), getURI())->setString(1671172ul, newValue);
295 getTLMutator().modify(getClassId(), getURI())->unset(1671172ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
305 return getObjectInstance().isSet(1671169ul, opflex::modb::PropertyInfo::STRING);
315 return getObjectInstance().getString(1671169ul);
324 const std::string&
getName(
const std::string& defaultValue)
326 return getName().get_value_or(defaultValue);
339 getTLMutator().modify(getClassId(), getURI())->setString(1671169ul, newValue);
351 getTLMutator().modify(getClassId(), getURI())->unset(1671169ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
366 static boost::optional<OF_SHARED_PTR<modelgbp::platform::Config> >
resolve(
367 opflex::ofcore::OFFramework& framework,
368 const opflex::modb::URI& uri)
370 return opflex::modb::mointernal::MO::resolve<modelgbp::platform::Config>(framework,
CLASS_ID, uri);
384 static boost::optional<OF_SHARED_PTR<modelgbp::platform::Config> >
resolve(
385 const opflex::modb::URI& uri)
387 return opflex::modb::mointernal::MO::resolve<modelgbp::platform::Config>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
406 static boost::optional<OF_SHARED_PTR<modelgbp::platform::Config> >
resolve(
407 opflex::ofcore::OFFramework& framework,
408 const std::string& platformConfigName)
410 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).build());
428 static boost::optional<OF_SHARED_PTR<modelgbp::platform::Config> >
resolve(
429 const std::string& platformConfigName)
431 return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName);
446 const std::string& gbpeSNATIPPoolName)
464 const std::string& gbpeSNATIPPoolName)
466 OF_SHARED_PTR<modelgbp::gbpe::SNATIPPool> result = addChild<modelgbp::gbpe::SNATIPPool>(
467 CLASS_ID, getURI(), 2149154862ul, 46,
468 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeSNATIPPool").addElement(gbpeSNATIPPoolName).build()
470 result->setName(gbpeSNATIPPoolName);
490 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::SNATIPPool>(
491 getFramework(),
CLASS_ID, getURI(), 2149154862ul, 46, out);
522 OF_SHARED_PTR<modelgbp::cdp::Config> result = addChild<modelgbp::cdp::Config>(
523 CLASS_ID, getURI(), 2149154869ul, 53,
524 opflex::modb::URIBuilder(getURI()).addElement(
"CdpConfig").build()
557 OF_SHARED_PTR<modelgbp::dfw::Config> result = addChild<modelgbp::dfw::Config>(
558 CLASS_ID, getURI(), 2149154870ul, 54,
559 opflex::modb::URIBuilder(getURI()).addElement(
"DfwConfig").build()
576 const std::string& domainConfigFromConfigRTgtSource)
594 const std::string& domainConfigFromConfigRTgtSource)
596 OF_SHARED_PTR<modelgbp::domain::ConfigFromConfigRTgt> result = addChild<modelgbp::domain::ConfigFromConfigRTgt>(
597 CLASS_ID, getURI(), 2149154874ul, 58,
598 opflex::modb::URIBuilder(getURI()).addElement(
"DomainConfigFromConfigRTgt").addElement(domainConfigFromConfigRTgtSource).build()
600 result->setSource(domainConfigFromConfigRTgtSource);
620 opflex::modb::mointernal::MO::resolveChildren<modelgbp::domain::ConfigFromConfigRTgt>(
621 getFramework(),
CLASS_ID, getURI(), 2149154874ul, 58, out);
652 OF_SHARED_PTR<modelgbp::l2::Config> result = addChild<modelgbp::l2::Config>(
653 CLASS_ID, getURI(), 2149154882ul, 66,
654 opflex::modb::URIBuilder(getURI()).addElement(
"L2Config").build()
687 OF_SHARED_PTR<modelgbp::lacp::Config> result = addChild<modelgbp::lacp::Config>(
688 CLASS_ID, getURI(), 2149154883ul, 67,
689 opflex::modb::URIBuilder(getURI()).addElement(
"LacpConfig").build()
722 OF_SHARED_PTR<modelgbp::lldp::Config> result = addChild<modelgbp::lldp::Config>(
723 CLASS_ID, getURI(), 2149154884ul, 68,
724 opflex::modb::URIBuilder(getURI()).addElement(
"LldpConfig").build()
741 const std::string& spanSrcGrpName)
743 return modelgbp::span::SrcGrp::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"SpanSrcGrp").addElement(spanSrcGrpName).build());
759 const std::string& spanSrcGrpName)
761 OF_SHARED_PTR<modelgbp::span::SrcGrp> result = addChild<modelgbp::span::SrcGrp>(
762 CLASS_ID, getURI(), 2149154886ul, 70,
763 opflex::modb::URIBuilder(getURI()).addElement(
"SpanSrcGrp").addElement(spanSrcGrpName).build()
765 result->setName(spanSrcGrpName);
785 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::SrcGrp>(
786 getFramework(),
CLASS_ID, getURI(), 2149154886ul, 70, out);
801 const std::string& spanDstGrpName)
803 return modelgbp::span::DstGrp::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"SpanDstGrp").addElement(spanDstGrpName).build());
819 const std::string& spanDstGrpName)
821 OF_SHARED_PTR<modelgbp::span::DstGrp> result = addChild<modelgbp::span::DstGrp>(
822 CLASS_ID, getURI(), 2149154887ul, 71,
823 opflex::modb::URIBuilder(getURI()).addElement(
"SpanDstGrp").addElement(spanDstGrpName).build()
825 result->setName(spanDstGrpName);
845 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::DstGrp>(
846 getFramework(),
CLASS_ID, getURI(), 2149154887ul, 71, out);
861 const std::string& spanLocalEpName)
879 const std::string& spanLocalEpName)
881 OF_SHARED_PTR<modelgbp::span::LocalEp> result = addChild<modelgbp::span::LocalEp>(
882 CLASS_ID, getURI(), 2149154888ul, 72,
883 opflex::modb::URIBuilder(getURI()).addElement(
"SpanLocalEp").addElement(spanLocalEpName).build()
885 result->setName(spanLocalEpName);
905 opflex::modb::mointernal::MO::resolveChildren<modelgbp::span::LocalEp>(
906 getFramework(),
CLASS_ID, getURI(), 2149154888ul, 72, out);
937 OF_SHARED_PTR<modelgbp::stp::Config> result = addChild<modelgbp::stp::Config>(
938 CLASS_ID, getURI(), 2149154899ul, 83,
939 opflex::modb::URIBuilder(getURI()).addElement(
"StpConfig").build()
954 getTLMutator().remove(
CLASS_ID, getURI());
967 static void remove(opflex::ofcore::OFFramework& framework,
968 const opflex::modb::URI& uri)
970 MO::remove(framework,
CLASS_ID, uri);
983 static void remove(
const opflex::modb::URI& uri)
985 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
1003 opflex::ofcore::OFFramework& framework,
1004 const std::string& platformConfigName)
1006 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).build());
1024 const std::string& platformConfigName)
1026 remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName);
1041 opflex::ofcore::OFFramework& framework,
1042 opflex::modb::ObjectListener* listener)
1044 opflex::modb::mointernal
1045 ::MO::registerListener(framework, listener,
CLASS_ID);
1060 opflex::modb::ObjectListener* listener)
1062 registerListener(opflex::ofcore::OFFramework::defaultInstance(), listener);
1072 opflex::ofcore::OFFramework& framework,
1073 opflex::modb::ObjectListener* listener)
1075 opflex::modb::mointernal
1076 ::MO::unregisterListener(framework, listener,
CLASS_ID);
1086 opflex::modb::ObjectListener* listener)
1096 opflex::ofcore::OFFramework& framework,
1097 const opflex::modb::URI& uri,
1098 const OF_SHARED_PTR<const opflex::modb::mointernal::ObjectInstance>& oi)
1099 : MO(framework,
CLASS_ID, uri, oi) { }
1104 #endif // GI_PLATFORM_CONFIG_HPP
static boost::optional< OF_SHARED_PTR< modelgbp::stp::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: stp/Config.hpp:210
static boost::optional< OF_SHARED_PTR< modelgbp::l2::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: l2/Config.hpp:154
static boost::optional< OF_SHARED_PTR< modelgbp::domain::ConfigFromConfigRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ConfigFromConfigRTgt from the managed object store.
Definition: ConfigFromConfigRTgt.hpp:210
static boost::optional< OF_SHARED_PTR< modelgbp::gbpe::SNATIPPool > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SNATIPPool from the managed object store.
Definition: SNATIPPool.hpp:322
static boost::optional< OF_SHARED_PTR< modelgbp::span::DstGrp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of DstGrp from the managed object store.
Definition: DstGrp.hpp:106
static boost::optional< OF_SHARED_PTR< modelgbp::lacp::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: lacp/Config.hpp:322
static boost::optional< OF_SHARED_PTR< modelgbp::dfw::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: dfw/Config.hpp:154
static boost::optional< OF_SHARED_PTR< modelgbp::span::LocalEp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEp from the managed object store.
Definition: LocalEp.hpp:162
static boost::optional< OF_SHARED_PTR< modelgbp::span::SrcGrp > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SrcGrp from the managed object store.
Definition: SrcGrp.hpp:218
static boost::optional< OF_SHARED_PTR< modelgbp::cdp::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: cdp/Config.hpp:154
static boost::optional< OF_SHARED_PTR< modelgbp::lldp::Config > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Config from the managed object store.
Definition: lldp/Config.hpp:210