11 #ifndef GI_GBP_SUBNETS_HPP 12 #define GI_GBP_SUBNETS_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/gbp/EpGroupFromSubnetsRTgt.hpp" 24 #include "modelgbp/gbp/RoutingDomainFromIntSubnetsRTgt.hpp" 28 #include "modelgbp/gbp/Subnet.hpp" 32 #include "modelgbp/gbp/ForwardingBehavioralGroupFromSubnetsRTgt.hpp" 38 :
public opflex::modb::mointernal::MO
45 static const opflex::modb::class_id_t
CLASS_ID = 148;
53 return getObjectInstance().isSet(4849665ul, opflex::modb::PropertyInfo::STRING);
60 boost::optional<const std::string&>
getName()
63 return getObjectInstance().getString(4849665ul);
72 const std::string&
getName(
const std::string& defaultValue)
74 return getName().get_value_or(defaultValue);
87 getTLMutator().modify(getClassId(), getURI())->setString(4849665ul, newValue);
99 getTLMutator().modify(getClassId(), getURI())->unset(4849665ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
114 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
115 opflex::ofcore::OFFramework& framework,
116 const opflex::modb::URI& uri)
118 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnets>(framework,
CLASS_ID, uri);
132 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
133 const opflex::modb::URI& uri)
135 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnets>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
156 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
157 opflex::ofcore::OFFramework& framework,
158 const std::string& policySpaceName,
159 const std::string& gbpSubnetsName)
161 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).build());
181 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
182 const std::string& policySpaceName,
183 const std::string& gbpSubnetsName)
185 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName);
200 const std::string& gbpEpGroupFromSubnetsRTgtSource)
218 const std::string& gbpEpGroupFromSubnetsRTgtSource)
220 boost::shared_ptr<modelgbp::gbp::EpGroupFromSubnetsRTgt> result = addChild<modelgbp::gbp::EpGroupFromSubnetsRTgt>(
221 CLASS_ID, getURI(), 2152333430ul, 118,
222 opflex::modb::URIBuilder(getURI()).addElement(
"GbpEpGroupFromSubnetsRTgt").addElement(gbpEpGroupFromSubnetsRTgtSource).build()
224 result->setSource(gbpEpGroupFromSubnetsRTgtSource);
244 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::EpGroupFromSubnetsRTgt>(
245 getFramework(),
CLASS_ID, getURI(), 2152333430ul, 118, out);
260 const std::string& gbpRoutingDomainFromIntSubnetsRTgtSource)
278 const std::string& gbpRoutingDomainFromIntSubnetsRTgtSource)
280 boost::shared_ptr<modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt> result = addChild<modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt>(
281 CLASS_ID, getURI(), 2152333456ul, 144,
282 opflex::modb::URIBuilder(getURI()).addElement(
"GbpRoutingDomainFromIntSubnetsRTgt").addElement(gbpRoutingDomainFromIntSubnetsRTgtSource).build()
284 result->setSource(gbpRoutingDomainFromIntSubnetsRTgtSource);
304 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt>(
305 getFramework(),
CLASS_ID, getURI(), 2152333456ul, 144, out);
320 const std::string& gbpSubnetName)
322 return modelgbp::gbp::Subnet::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"GbpSubnet").addElement(gbpSubnetName).build());
338 const std::string& gbpSubnetName)
340 boost::shared_ptr<modelgbp::gbp::Subnet> result = addChild<modelgbp::gbp::Subnet>(
341 CLASS_ID, getURI(), 2152333459ul, 147,
342 opflex::modb::URIBuilder(getURI()).addElement(
"GbpSubnet").addElement(gbpSubnetName).build()
344 result->setName(gbpSubnetName);
364 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::Subnet>(
365 getFramework(),
CLASS_ID, getURI(), 2152333459ul, 147, out);
380 const std::string& gbpForwardingBehavioralGroupFromSubnetsRTgtSource)
398 const std::string& gbpForwardingBehavioralGroupFromSubnetsRTgtSource)
400 boost::shared_ptr<modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt> result = addChild<modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt>(
401 CLASS_ID, getURI(), 2152333464ul, 152,
402 opflex::modb::URIBuilder(getURI()).addElement(
"GbpForwardingBehavioralGroupFromSubnetsRTgt").addElement(gbpForwardingBehavioralGroupFromSubnetsRTgtSource).build()
404 result->setSource(gbpForwardingBehavioralGroupFromSubnetsRTgtSource);
424 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt>(
425 getFramework(),
CLASS_ID, getURI(), 2152333464ul, 152, out);
438 getTLMutator().remove(CLASS_ID, getURI());
451 static void remove(opflex::ofcore::OFFramework& framework,
452 const opflex::modb::URI& uri)
454 MO::remove(framework, CLASS_ID, uri);
467 static void remove(
const opflex::modb::URI& uri)
469 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
489 opflex::ofcore::OFFramework& framework,
490 const std::string& policySpaceName,
491 const std::string& gbpSubnetsName)
493 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).build());
513 const std::string& policySpaceName,
514 const std::string& gbpSubnetsName)
516 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName);
531 opflex::ofcore::OFFramework& framework,
532 opflex::modb::ObjectListener* listener)
534 opflex::modb::mointernal
535 ::MO::registerListener(framework, listener, CLASS_ID);
550 opflex::modb::ObjectListener* listener)
562 opflex::ofcore::OFFramework& framework,
563 opflex::modb::ObjectListener* listener)
565 opflex::modb::mointernal
566 ::MO::unregisterListener(framework, listener, CLASS_ID);
576 opflex::modb::ObjectListener* listener)
586 opflex::ofcore::OFFramework& framework,
587 const opflex::modb::URI& uri,
588 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
589 : MO(framework, CLASS_ID, uri, oi) { }
594 #endif // GI_GBP_SUBNETS_HPP boost::optional< boost::shared_ptr< modelgbp::gbp::EpGroupFromSubnetsRTgt > > resolveGbpEpGroupFromSubnetsRTgt(const std::string &gbpEpGroupFromSubnetsRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: Subnets.hpp:199
void resolveGbpForwardingBehavioralGroupFromSubnetsRTgt(std::vector< boost::shared_ptr< modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::ForwardingBehavioralGroupFr...
Definition: Subnets.hpp:422
static boost::optional< boost::shared_ptr< modelgbp::gbp::EpGroupFromSubnetsRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpGroupFromSubnetsRTgt from the managed object store.
Definition: EpGroupFromSubnetsRTgt.hpp:210
static boost::optional< boost::shared_ptr< modelgbp::gbp::Subnet > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Subnet from the managed object store.
Definition: Subnet.hpp:434
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Subnets.hpp:60
boost::shared_ptr< modelgbp::gbp::EpGroupFromSubnetsRTgt > addGbpEpGroupFromSubnetsRTgt(const std::string &gbpEpGroupFromSubnetsRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Subnets.hpp:217
void resolveGbpSubnet(std::vector< boost::shared_ptr< modelgbp::gbp::Subnet > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::Subnet. ...
Definition: Subnets.hpp:362
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: Subnets.hpp:549
boost::optional< boost::shared_ptr< modelgbp::gbp::Subnet > > resolveGbpSubnet(const std::string &gbpSubnetName)
Retrieve the child object with the specified naming properties.
Definition: Subnets.hpp:319
boost::shared_ptr< modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt > addGbpForwardingBehavioralGroupFromSubnetsRTgt(const std::string &gbpForwardingBehavioralGroupFromSubnetsRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Subnets.hpp:397
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Subnets.hpp:561
static boost::optional< boost::shared_ptr< modelgbp::gbp::Subnets > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Subnets from the managed object store.
Definition: Subnets.hpp:114
boost::optional< boost::shared_ptr< modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt > > resolveGbpForwardingBehavioralGroupFromSubnetsRTgt(const std::string &gbpForwardingBehavioralGroupFromSubnetsRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: Subnets.hpp:379
static boost::optional< boost::shared_ptr< modelgbp::gbp::Subnets > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName, const std::string &gbpSubnetsName)
Retrieve an instance of Subnets from the managed object store by constructing its URI from the path e...
Definition: Subnets.hpp:156
static boost::optional< boost::shared_ptr< modelgbp::gbp::Subnets > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Subnets from the managed object store using the default framework instance...
Definition: Subnets.hpp:132
boost::shared_ptr< modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt > addGbpRoutingDomainFromIntSubnetsRTgt(const std::string &gbpRoutingDomainFromIntSubnetsRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Subnets.hpp:277
static boost::optional< boost::shared_ptr< modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RoutingDomainFromIntSubnetsRTgt from the managed object store.
Definition: RoutingDomainFromIntSubnetsRTgt.hpp:210
Definition: Subnets.hpp:37
Subnets(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Subnets.
Definition: Subnets.hpp:585
modelgbp::gbp::Subnets & unsetName()
Unset name in the currently-active mutator.
Definition: Subnets.hpp:97
boost::shared_ptr< modelgbp::gbp::Subnet > addGbpSubnet(const std::string &gbpSubnetName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Subnets.hpp:337
boost::optional< boost::shared_ptr< modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt > > resolveGbpRoutingDomainFromIntSubnetsRTgt(const std::string &gbpRoutingDomainFromIntSubnetsRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: Subnets.hpp:259
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: Subnets.hpp:530
void resolveGbpEpGroupFromSubnetsRTgt(std::vector< boost::shared_ptr< modelgbp::gbp::EpGroupFromSubnetsRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::EpGroupFromSubnetsRTgt.
Definition: Subnets.hpp:242
static boost::optional< boost::shared_ptr< modelgbp::gbp::Subnets > > resolve(const std::string &policySpaceName, const std::string &gbpSubnetsName)
Retrieve an instance of Subnets from the default managed object store by constructing its URI from th...
Definition: Subnets.hpp:181
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Subnets.hpp:575
static boost::optional< boost::shared_ptr< modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of ForwardingBehavioralGroupFromSubnetsRTgt from the managed object store...
Definition: ForwardingBehavioralGroupFromSubnetsRTgt.hpp:210
modelgbp::gbp::Subnets & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Subnets.hpp:85
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: Subnets.hpp:72
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Subnets.
Definition: Subnets.hpp:45
bool isNameSet()
Check whether name has been set.
Definition: Subnets.hpp:51
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
void resolveGbpRoutingDomainFromIntSubnetsRTgt(std::vector< boost::shared_ptr< modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::RoutingDomainFromIntSubnets...
Definition: Subnets.hpp:302