11 #ifndef GI_SPAN_LOCALEPTOEPRSRC_HPP
12 #define GI_SPAN_LOCALEPTOEPRSRC_HPP
14 #include <boost/optional.hpp>
15 #include "opflex/modb/URIBuilder.h"
16 #include "opflex/modb/mo-internal/MO.h"
22 :
public opflex::modb::mointernal::MO
29 static const opflex::modb::class_id_t
CLASS_ID = 53;
37 return getObjectInstance().isSet(1736706ul, opflex::modb::PropertyInfo::ENUM8);
47 return (
const uint8_t)getObjectInstance().getUInt64(1736706ul);
56 const uint8_t
getRole(
const uint8_t defaultValue)
58 return getRole().get_value_or(defaultValue);
71 getTLMutator().modify(getClassId(), getURI())->setUInt64(1736706ul, newValue);
83 getTLMutator().modify(getClassId(), getURI())->unset(1736706ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
93 return getObjectInstance().isSet(1736707ul, opflex::modb::PropertyInfo::REFERENCE);
103 return getObjectInstance().getReference(1736707ul).first;
114 return getObjectInstance().getReference(1736707ul).second;
149 getTLMutator().modify(getClassId(), getURI())->setReference(1736707ul, 82, uri);
171 const std::string& eprL2EpContext,
172 const opflex::modb::MAC& eprL2EpMac)
174 getTLMutator().modify(getClassId(), getURI())->setReference(1736707ul, 82, opflex::modb::URIBuilder().addElement(
"EprL2Universe").addElement(
"EprL2Ep").addElement(eprL2EpContext).addElement(eprL2EpMac).build());
189 getTLMutator().modify(getClassId(), getURI())->setReference(1736707ul, 84, uri);
211 const std::string& eprL3EpContext,
212 const std::string& eprL3EpIp)
214 getTLMutator().modify(getClassId(), getURI())->setReference(1736707ul, 84, opflex::modb::URIBuilder().addElement(
"EprL3Universe").addElement(
"EprL3Ep").addElement(eprL3EpContext).addElement(eprL3EpIp).build());
226 getTLMutator().modify(getClassId(), getURI())->unset(1736707ul, opflex::modb::PropertyInfo::REFERENCE, opflex::modb::PropertyInfo::SCALAR);
236 return getObjectInstance().isSet(1736705ul, opflex::modb::PropertyInfo::ENUM8);
246 return (
const uint8_t)getObjectInstance().getUInt64(1736705ul);
255 const uint8_t
getType(
const uint8_t defaultValue)
257 return getType().get_value_or(defaultValue);
270 getTLMutator().modify(getClassId(), getURI())->setUInt64(1736705ul, newValue);
282 getTLMutator().modify(getClassId(), getURI())->unset(1736705ul, opflex::modb::PropertyInfo::ENUM8, opflex::modb::PropertyInfo::SCALAR);
297 static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpToEpRSrc> >
resolve(
298 opflex::ofcore::OFFramework& framework,
299 const opflex::modb::URI& uri)
301 return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEpToEpRSrc>(framework,
CLASS_ID, uri);
315 static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpToEpRSrc> >
resolve(
316 const opflex::modb::URI& uri)
318 return opflex::modb::mointernal::MO::resolve<modelgbp::span::LocalEpToEpRSrc>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
339 static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpToEpRSrc> >
resolve(
340 opflex::ofcore::OFFramework& framework,
341 const std::string& platformConfigName,
342 const std::string& spanLocalEpName)
344 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanLocalEp").addElement(spanLocalEpName).addElement(
"SpanLocalEpToEpRSrc").build());
364 static boost::optional<boost::shared_ptr<modelgbp::span::LocalEpToEpRSrc> >
resolve(
365 const std::string& platformConfigName,
366 const std::string& spanLocalEpName)
368 return resolve(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanLocalEpName);
381 getTLMutator().remove(
CLASS_ID, getURI());
394 static void remove(opflex::ofcore::OFFramework& framework,
395 const opflex::modb::URI& uri)
397 MO::remove(framework,
CLASS_ID, uri);
410 static void remove(
const opflex::modb::URI& uri)
412 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
432 opflex::ofcore::OFFramework& framework,
433 const std::string& platformConfigName,
434 const std::string& spanLocalEpName)
436 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PlatformConfig").addElement(platformConfigName).addElement(
"SpanLocalEp").addElement(spanLocalEpName).addElement(
"SpanLocalEpToEpRSrc").build());
456 const std::string& platformConfigName,
457 const std::string& spanLocalEpName)
459 remove(opflex::ofcore::OFFramework::defaultInstance(),platformConfigName,spanLocalEpName);
474 opflex::ofcore::OFFramework& framework,
475 opflex::modb::ObjectListener* listener)
477 opflex::modb::mointernal
478 ::MO::registerListener(framework, listener,
CLASS_ID);
493 opflex::modb::ObjectListener* listener)
505 opflex::ofcore::OFFramework& framework,
506 opflex::modb::ObjectListener* listener)
508 opflex::modb::mointernal
509 ::MO::unregisterListener(framework, listener,
CLASS_ID);
519 opflex::modb::ObjectListener* listener)
529 opflex::ofcore::OFFramework& framework,
530 const opflex::modb::URI& uri,
531 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
532 : MO(framework,
CLASS_ID, uri, oi) { }
537 #endif // GI_SPAN_LOCALEPTOEPRSRC_HPP
boost::optional< const uint8_t > getType()
Get the value of type if it has been set.
Definition: LocalEpToEpRSrc.hpp:243
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: LocalEpToEpRSrc.hpp:518
boost::optional< const uint8_t > getRole()
Get the value of role if it has been set.
Definition: LocalEpToEpRSrc.hpp:44
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpToEpRSrc > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of LocalEpToEpRSrc from the managed object store using the default framework ins...
Definition: LocalEpToEpRSrc.hpp:315
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpToEpRSrc > > resolve(const std::string &platformConfigName, const std::string &spanLocalEpName)
Retrieve an instance of LocalEpToEpRSrc from the default managed object store by constructing its URI...
Definition: LocalEpToEpRSrc.hpp:364
static void registerListener(opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class with the default framework...
Definition: LocalEpToEpRSrc.hpp:492
LocalEpToEpRSrc(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of LocalEpToEpRSrc.
Definition: LocalEpToEpRSrc.hpp:528
modelgbp::span::LocalEpToEpRSrc & setTargetL3Ep(const std::string &eprL3EpContext, const std::string &eprL3EpIp)
Set the reference to point to an instance of L3Ep in the currently-active mutator by constructing its...
Definition: LocalEpToEpRSrc.hpp:210
opflex::modb::URI getTargetURI(opflex::modb::URI defaultValue)
Get the value of targetURI if set, otherwise the value of default passed in.
Definition: LocalEpToEpRSrc.hpp:133
modelgbp::span::LocalEpToEpRSrc & setTargetL3Ep(const opflex::modb::URI &uri)
Set the reference to point to an instance of L3Ep with the specified URI.
Definition: LocalEpToEpRSrc.hpp:187
modelgbp::span::LocalEpToEpRSrc & unsetTarget()
Unset target in the currently-active mutator.
Definition: LocalEpToEpRSrc.hpp:224
const uint8_t getRole(const uint8_t defaultValue)
Get the value of role if set, otherwise the value of default passed in.
Definition: LocalEpToEpRSrc.hpp:56
bool isTypeSet()
Check whether type has been set.
Definition: LocalEpToEpRSrc.hpp:234
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpToEpRSrc > > resolve(opflex::ofcore::OFFramework &framework, const std::string &platformConfigName, const std::string &spanLocalEpName)
Retrieve an instance of LocalEpToEpRSrc from the managed object store by constructing its URI from th...
Definition: LocalEpToEpRSrc.hpp:339
modelgbp::span::LocalEpToEpRSrc & setType(const uint8_t newValue)
Set type to the specified value in the currently-active mutator.
Definition: LocalEpToEpRSrc.hpp:268
bool isRoleSet()
Check whether role has been set.
Definition: LocalEpToEpRSrc.hpp:35
const uint8_t getType(const uint8_t defaultValue)
Get the value of type if set, otherwise the value of default passed in.
Definition: LocalEpToEpRSrc.hpp:255
opflex::modb::class_id_t getTargetClass(opflex::modb::class_id_t defaultValue)
Get the value of targetClass if set, otherwise the value of default passed in.
Definition: LocalEpToEpRSrc.hpp:123
modelgbp::span::LocalEpToEpRSrc & setTargetL2Ep(const std::string &eprL2EpContext, const opflex::modb::MAC &eprL2EpMac)
Set the reference to point to an instance of L2Ep in the currently-active mutator by constructing its...
Definition: LocalEpToEpRSrc.hpp:170
modelgbp::span::LocalEpToEpRSrc & unsetRole()
Unset role in the currently-active mutator.
Definition: LocalEpToEpRSrc.hpp:81
boost::optional< opflex::modb::URI > getTargetURI()
Get the value of targetURI if it has been set.
Definition: LocalEpToEpRSrc.hpp:111
bool isTargetSet()
Check whether target has been set.
Definition: LocalEpToEpRSrc.hpp:91
boost::optional< opflex::modb::class_id_t > getTargetClass()
Get the value of targetClass if it has been set.
Definition: LocalEpToEpRSrc.hpp:100
modelgbp::span::LocalEpToEpRSrc & setRole(const uint8_t newValue)
Set role to the specified value in the currently-active mutator.
Definition: LocalEpToEpRSrc.hpp:69
modelgbp::span::LocalEpToEpRSrc & unsetType()
Unset type in the currently-active mutator.
Definition: LocalEpToEpRSrc.hpp:280
static boost::optional< boost::shared_ptr< modelgbp::span::LocalEpToEpRSrc > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of LocalEpToEpRSrc from the managed object store.
Definition: LocalEpToEpRSrc.hpp:297
static void registerListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Register a listener that will get called for changes related to this class.
Definition: LocalEpToEpRSrc.hpp:473
Definition: LocalEpToEpRSrc.hpp:21
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for LocalEpToEpRSrc.
Definition: LocalEpToEpRSrc.hpp:29
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: LocalEpToEpRSrc.hpp:504
modelgbp::span::LocalEpToEpRSrc & setTargetL2Ep(const opflex::modb::URI &uri)
Set the reference to point to an instance of L2Ep with the specified URI.
Definition: LocalEpToEpRSrc.hpp:147