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"
36 #include "modelgbp/gbp/SecGroupRuleFromRemoteAddressRTgt.hpp"
42 :
public opflex::modb::mointernal::MO
49 static const opflex::modb::class_id_t
CLASS_ID = 152;
57 return getObjectInstance().isSet(4980737ul, opflex::modb::PropertyInfo::STRING);
64 boost::optional<const std::string&>
getName()
67 return getObjectInstance().getString(4980737ul);
76 const std::string&
getName(
const std::string& defaultValue)
78 return getName().get_value_or(defaultValue);
91 getTLMutator().modify(getClassId(), getURI())->setString(4980737ul, newValue);
103 getTLMutator().modify(getClassId(), getURI())->unset(4980737ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
118 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
119 opflex::ofcore::OFFramework& framework,
120 const opflex::modb::URI& uri)
122 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnets>(framework,
CLASS_ID, uri);
136 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
137 const opflex::modb::URI& uri)
139 return opflex::modb::mointernal::MO::resolve<modelgbp::gbp::Subnets>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
160 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
161 opflex::ofcore::OFFramework& framework,
162 const std::string& policySpaceName,
163 const std::string& gbpSubnetsName)
165 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).build());
185 static boost::optional<boost::shared_ptr<modelgbp::gbp::Subnets> >
resolve(
186 const std::string& policySpaceName,
187 const std::string& gbpSubnetsName)
189 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName);
204 const std::string& gbpEpGroupFromSubnetsRTgtSource)
222 const std::string& gbpEpGroupFromSubnetsRTgtSource)
224 boost::shared_ptr<modelgbp::gbp::EpGroupFromSubnetsRTgt> result = addChild<modelgbp::gbp::EpGroupFromSubnetsRTgt>(
225 CLASS_ID, getURI(), 2152464506ul, 122,
226 opflex::modb::URIBuilder(getURI()).addElement(
"GbpEpGroupFromSubnetsRTgt").addElement(gbpEpGroupFromSubnetsRTgtSource).build()
228 result->setSource(gbpEpGroupFromSubnetsRTgtSource);
248 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::EpGroupFromSubnetsRTgt>(
249 getFramework(),
CLASS_ID, getURI(), 2152464506ul, 122, out);
264 const std::string& gbpRoutingDomainFromIntSubnetsRTgtSource)
282 const std::string& gbpRoutingDomainFromIntSubnetsRTgtSource)
284 boost::shared_ptr<modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt> result = addChild<modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt>(
285 CLASS_ID, getURI(), 2152464532ul, 148,
286 opflex::modb::URIBuilder(getURI()).addElement(
"GbpRoutingDomainFromIntSubnetsRTgt").addElement(gbpRoutingDomainFromIntSubnetsRTgtSource).build()
288 result->setSource(gbpRoutingDomainFromIntSubnetsRTgtSource);
308 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RoutingDomainFromIntSubnetsRTgt>(
309 getFramework(),
CLASS_ID, getURI(), 2152464532ul, 148, out);
324 const std::string& gbpSubnetName)
326 return modelgbp::gbp::Subnet::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"GbpSubnet").addElement(gbpSubnetName).build());
342 const std::string& gbpSubnetName)
344 boost::shared_ptr<modelgbp::gbp::Subnet> result = addChild<modelgbp::gbp::Subnet>(
345 CLASS_ID, getURI(), 2152464535ul, 151,
346 opflex::modb::URIBuilder(getURI()).addElement(
"GbpSubnet").addElement(gbpSubnetName).build()
348 result->setName(gbpSubnetName);
368 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::Subnet>(
369 getFramework(),
CLASS_ID, getURI(), 2152464535ul, 151, out);
384 const std::string& gbpForwardingBehavioralGroupFromSubnetsRTgtSource)
402 const std::string& gbpForwardingBehavioralGroupFromSubnetsRTgtSource)
404 boost::shared_ptr<modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt> result = addChild<modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt>(
405 CLASS_ID, getURI(), 2152464540ul, 156,
406 opflex::modb::URIBuilder(getURI()).addElement(
"GbpForwardingBehavioralGroupFromSubnetsRTgt").addElement(gbpForwardingBehavioralGroupFromSubnetsRTgtSource).build()
408 result->setSource(gbpForwardingBehavioralGroupFromSubnetsRTgtSource);
428 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::ForwardingBehavioralGroupFromSubnetsRTgt>(
429 getFramework(),
CLASS_ID, getURI(), 2152464540ul, 156, out);
444 const std::string& gbpSecGroupRuleFromRemoteAddressRTgtSource)
462 const std::string& gbpSecGroupRuleFromRemoteAddressRTgtSource)
464 boost::shared_ptr<modelgbp::gbp::SecGroupRuleFromRemoteAddressRTgt> result = addChild<modelgbp::gbp::SecGroupRuleFromRemoteAddressRTgt>(
465 CLASS_ID, getURI(), 2152464547ul, 163,
466 opflex::modb::URIBuilder(getURI()).addElement(
"GbpSecGroupRuleFromRemoteAddressRTgt").addElement(gbpSecGroupRuleFromRemoteAddressRTgtSource).build()
468 result->setSource(gbpSecGroupRuleFromRemoteAddressRTgtSource);
488 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::SecGroupRuleFromRemoteAddressRTgt>(
489 getFramework(),
CLASS_ID, getURI(), 2152464547ul, 163, out);
502 getTLMutator().remove(
CLASS_ID, getURI());
515 static void remove(opflex::ofcore::OFFramework& framework,
516 const opflex::modb::URI& uri)
518 MO::remove(framework,
CLASS_ID, uri);
531 static void remove(
const opflex::modb::URI& uri)
533 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
553 opflex::ofcore::OFFramework& framework,
554 const std::string& policySpaceName,
555 const std::string& gbpSubnetsName)
557 MO::remove(framework,
CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).addElement(
"GbpSubnets").addElement(gbpSubnetsName).build());
577 const std::string& policySpaceName,
578 const std::string& gbpSubnetsName)
580 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName,gbpSubnetsName);
595 opflex::ofcore::OFFramework& framework,
596 opflex::modb::ObjectListener* listener)
598 opflex::modb::mointernal
599 ::MO::registerListener(framework, listener,
CLASS_ID);
614 opflex::modb::ObjectListener* listener)
626 opflex::ofcore::OFFramework& framework,
627 opflex::modb::ObjectListener* listener)
629 opflex::modb::mointernal
630 ::MO::unregisterListener(framework, listener,
CLASS_ID);
640 opflex::modb::ObjectListener* listener)
650 opflex::ofcore::OFFramework& framework,
651 const opflex::modb::URI& uri,
652 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
653 : MO(framework,
CLASS_ID, uri, oi) { }
658 #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:203
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:426
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
static boost::optional< boost::shared_ptr< modelgbp::gbp::SecGroupRuleFromRemoteAddressRTgt > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of SecGroupRuleFromRemoteAddressRTgt from the managed object store...
Definition: SecGroupRuleFromRemoteAddressRTgt.hpp:210
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Subnets.hpp:64
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:221
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:366
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:613
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:323
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:401
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Subnets.hpp:625
boost::optional< boost::shared_ptr< modelgbp::gbp::SecGroupRuleFromRemoteAddressRTgt > > resolveGbpSecGroupRuleFromRemoteAddressRTgt(const std::string &gbpSecGroupRuleFromRemoteAddressRTgtSource)
Retrieve the child object with the specified naming properties.
Definition: Subnets.hpp:443
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:118
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:383
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:160
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:136
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:281
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:41
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:649
modelgbp::gbp::Subnets & unsetName()
Unset name in the currently-active mutator.
Definition: Subnets.hpp:101
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:341
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:263
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:594
void resolveGbpSecGroupRuleFromRemoteAddressRTgt(std::vector< boost::shared_ptr< modelgbp::gbp::SecGroupRuleFromRemoteAddressRTgt > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::SecGroupRuleFromRemoteAddre...
Definition: Subnets.hpp:486
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:246
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:185
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Subnets.hpp:639
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:89
boost::shared_ptr< modelgbp::gbp::SecGroupRuleFromRemoteAddressRTgt > addGbpSecGroupRuleFromRemoteAddressRTgt(const std::string &gbpSecGroupRuleFromRemoteAddressRTgtSource)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Subnets.hpp:461
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:76
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Subnets.
Definition: Subnets.hpp:49
bool isNameSet()
Check whether name has been set.
Definition: Subnets.hpp:55
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:306