11 #ifndef GI_POLICY_SPACE_HPP 12 #define GI_POLICY_SPACE_HPP 14 #include <boost/optional.hpp> 15 #include "opflex/modb/URIBuilder.h" 16 #include "opflex/modb/mo-internal/MO.h" 20 #include "modelgbp/gbpe/L24Classifier.hpp" 24 #include "modelgbp/gbp/AllowDenyAction.hpp" 28 #include "modelgbp/gbp/Contract.hpp" 32 #include "modelgbp/gbp/EpGroup.hpp" 36 #include "modelgbp/gbp/BridgeDomain.hpp" 40 #include "modelgbp/gbp/FloodDomain.hpp" 44 #include "modelgbp/gbp/RoutingDomain.hpp" 48 #include "modelgbp/gbp/Subnets.hpp" 54 :
public opflex::modb::mointernal::MO
61 static const opflex::modb::class_id_t
CLASS_ID = 169;
69 return getObjectInstance().isSet(5537793ul, opflex::modb::PropertyInfo::STRING);
76 boost::optional<const std::string&>
getName()
79 return getObjectInstance().getString(5537793ul);
88 const std::string&
getName(
const std::string& defaultValue)
90 return getName().get_value_or(defaultValue);
103 getTLMutator().modify(getClassId(), getURI())->setString(5537793ul, newValue);
115 getTLMutator().modify(getClassId(), getURI())->unset(5537793ul, opflex::modb::PropertyInfo::STRING, opflex::modb::PropertyInfo::SCALAR);
130 static boost::optional<boost::shared_ptr<modelgbp::policy::Space> >
resolve(
131 opflex::ofcore::OFFramework& framework,
132 const opflex::modb::URI& uri)
134 return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Space>(framework,
CLASS_ID, uri);
148 static boost::optional<boost::shared_ptr<modelgbp::policy::Space> >
resolve(
149 const opflex::modb::URI& uri)
151 return opflex::modb::mointernal::MO::resolve<modelgbp::policy::Space>(opflex::ofcore::OFFramework::defaultInstance(),
CLASS_ID, uri);
170 static boost::optional<boost::shared_ptr<modelgbp::policy::Space> >
resolve(
171 opflex::ofcore::OFFramework& framework,
172 const std::string& policySpaceName)
174 return resolve(framework,opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).build());
192 static boost::optional<boost::shared_ptr<modelgbp::policy::Space> >
resolve(
193 const std::string& policySpaceName)
195 return resolve(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName);
210 const std::string& gbpeL24ClassifierName)
228 const std::string& gbpeL24ClassifierName)
230 boost::shared_ptr<modelgbp::gbpe::L24Classifier> result = addChild<modelgbp::gbpe::L24Classifier>(
231 CLASS_ID, getURI(), 2153021471ul, 31,
232 opflex::modb::URIBuilder(getURI()).addElement(
"GbpeL24Classifier").addElement(gbpeL24ClassifierName).build()
234 result->setName(gbpeL24ClassifierName);
254 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbpe::L24Classifier>(
255 getFramework(),
CLASS_ID, getURI(), 2153021471ul, 31, out);
270 const std::string& gbpAllowDenyActionName)
288 const std::string& gbpAllowDenyActionName)
290 boost::shared_ptr<modelgbp::gbp::AllowDenyAction> result = addChild<modelgbp::gbp::AllowDenyAction>(
291 CLASS_ID, getURI(), 2153021536ul, 96,
292 opflex::modb::URIBuilder(getURI()).addElement(
"GbpAllowDenyAction").addElement(gbpAllowDenyActionName).build()
294 result->setName(gbpAllowDenyActionName);
314 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::AllowDenyAction>(
315 getFramework(),
CLASS_ID, getURI(), 2153021536ul, 96, out);
330 const std::string& gbpContractName)
348 const std::string& gbpContractName)
350 boost::shared_ptr<modelgbp::gbp::Contract> result = addChild<modelgbp::gbp::Contract>(
351 CLASS_ID, getURI(), 2153021538ul, 98,
352 opflex::modb::URIBuilder(getURI()).addElement(
"GbpContract").addElement(gbpContractName).build()
354 result->setName(gbpContractName);
374 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::Contract>(
375 getFramework(),
CLASS_ID, getURI(), 2153021538ul, 98, out);
390 const std::string& gbpEpGroupName)
392 return modelgbp::gbp::EpGroup::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"GbpEpGroup").addElement(gbpEpGroupName).build());
408 const std::string& gbpEpGroupName)
410 boost::shared_ptr<modelgbp::gbp::EpGroup> result = addChild<modelgbp::gbp::EpGroup>(
411 CLASS_ID, getURI(), 2153021547ul, 107,
412 opflex::modb::URIBuilder(getURI()).addElement(
"GbpEpGroup").addElement(gbpEpGroupName).build()
414 result->setName(gbpEpGroupName);
434 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::EpGroup>(
435 getFramework(),
CLASS_ID, getURI(), 2153021547ul, 107, out);
450 const std::string& gbpBridgeDomainName)
468 const std::string& gbpBridgeDomainName)
470 boost::shared_ptr<modelgbp::gbp::BridgeDomain> result = addChild<modelgbp::gbp::BridgeDomain>(
471 CLASS_ID, getURI(), 2153021573ul, 133,
472 opflex::modb::URIBuilder(getURI()).addElement(
"GbpBridgeDomain").addElement(gbpBridgeDomainName).build()
474 result->setName(gbpBridgeDomainName);
494 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::BridgeDomain>(
495 getFramework(),
CLASS_ID, getURI(), 2153021573ul, 133, out);
510 const std::string& gbpFloodDomainName)
528 const std::string& gbpFloodDomainName)
530 boost::shared_ptr<modelgbp::gbp::FloodDomain> result = addChild<modelgbp::gbp::FloodDomain>(
531 CLASS_ID, getURI(), 2153021577ul, 137,
532 opflex::modb::URIBuilder(getURI()).addElement(
"GbpFloodDomain").addElement(gbpFloodDomainName).build()
534 result->setName(gbpFloodDomainName);
554 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::FloodDomain>(
555 getFramework(),
CLASS_ID, getURI(), 2153021577ul, 137, out);
570 const std::string& gbpRoutingDomainName)
588 const std::string& gbpRoutingDomainName)
590 boost::shared_ptr<modelgbp::gbp::RoutingDomain> result = addChild<modelgbp::gbp::RoutingDomain>(
591 CLASS_ID, getURI(), 2153021582ul, 142,
592 opflex::modb::URIBuilder(getURI()).addElement(
"GbpRoutingDomain").addElement(gbpRoutingDomainName).build()
594 result->setName(gbpRoutingDomainName);
614 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::RoutingDomain>(
615 getFramework(),
CLASS_ID, getURI(), 2153021582ul, 142, out);
630 const std::string& gbpSubnetsName)
632 return modelgbp::gbp::Subnets::resolve(getFramework(), opflex::modb::URIBuilder(getURI()).addElement(
"GbpSubnets").addElement(gbpSubnetsName).build());
648 const std::string& gbpSubnetsName)
650 boost::shared_ptr<modelgbp::gbp::Subnets> result = addChild<modelgbp::gbp::Subnets>(
651 CLASS_ID, getURI(), 2153021588ul, 148,
652 opflex::modb::URIBuilder(getURI()).addElement(
"GbpSubnets").addElement(gbpSubnetsName).build()
654 result->setName(gbpSubnetsName);
674 opflex::modb::mointernal::MO::resolveChildren<modelgbp::gbp::Subnets>(
675 getFramework(),
CLASS_ID, getURI(), 2153021588ul, 148, out);
688 getTLMutator().remove(CLASS_ID, getURI());
701 static void remove(opflex::ofcore::OFFramework& framework,
702 const opflex::modb::URI& uri)
704 MO::remove(framework, CLASS_ID, uri);
717 static void remove(
const opflex::modb::URI& uri)
719 remove(opflex::ofcore::OFFramework::defaultInstance(), uri);
737 opflex::ofcore::OFFramework& framework,
738 const std::string& policySpaceName)
740 MO::remove(framework, CLASS_ID, opflex::modb::URIBuilder().addElement(
"PolicyUniverse").addElement(
"PolicySpace").addElement(policySpaceName).build());
758 const std::string& policySpaceName)
760 remove(opflex::ofcore::OFFramework::defaultInstance(),policySpaceName);
775 opflex::ofcore::OFFramework& framework,
776 opflex::modb::ObjectListener* listener)
778 opflex::modb::mointernal
779 ::MO::registerListener(framework, listener, CLASS_ID);
794 opflex::modb::ObjectListener* listener)
806 opflex::ofcore::OFFramework& framework,
807 opflex::modb::ObjectListener* listener)
809 opflex::modb::mointernal
810 ::MO::unregisterListener(framework, listener, CLASS_ID);
820 opflex::modb::ObjectListener* listener)
830 opflex::ofcore::OFFramework& framework,
831 const opflex::modb::URI& uri,
832 const boost::shared_ptr<const opflex::modb::mointernal::ObjectInstance>& oi)
833 : MO(framework, CLASS_ID, uri, oi) { }
838 #endif // GI_POLICY_SPACE_HPP boost::shared_ptr< modelgbp::gbp::FloodDomain > addGbpFloodDomain(const std::string &gbpFloodDomainName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:527
void resolveGbpRoutingDomain(std::vector< boost::shared_ptr< modelgbp::gbp::RoutingDomain > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::RoutingDomain.
Definition: Space.hpp:612
static boost::optional< boost::shared_ptr< modelgbp::gbp::Contract > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Contract from the managed object store.
Definition: Contract.hpp:118
boost::shared_ptr< modelgbp::gbp::EpGroup > addGbpEpGroup(const std::string &gbpEpGroupName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:407
void resolveGbpContract(std::vector< boost::shared_ptr< modelgbp::gbp::Contract > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::Contract.
Definition: Space.hpp:372
boost::optional< boost::shared_ptr< modelgbp::gbpe::L24Classifier > > resolveGbpeL24Classifier(const std::string &gbpeL24ClassifierName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:209
static const opflex::modb::class_id_t CLASS_ID
The unique class ID for Space.
Definition: Space.hpp:61
modelgbp::policy::Space & unsetName()
Unset name in the currently-active mutator.
Definition: Space.hpp:113
Space(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri, const boost::shared_ptr< const opflex::modb::mointernal::ObjectInstance > &oi)
Construct an instance of Space.
Definition: Space.hpp:829
static boost::optional< boost::shared_ptr< modelgbp::policy::Space > > resolve(opflex::ofcore::OFFramework &framework, const std::string &policySpaceName)
Retrieve an instance of Space from the managed object store by constructing its URI from the path ele...
Definition: Space.hpp:170
boost::optional< boost::shared_ptr< modelgbp::gbp::FloodDomain > > resolveGbpFloodDomain(const std::string &gbpFloodDomainName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:509
void resolveGbpeL24Classifier(std::vector< boost::shared_ptr< modelgbp::gbpe::L24Classifier > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbpe::L24Classifier.
Definition: Space.hpp:252
static boost::optional< boost::shared_ptr< modelgbp::policy::Space > > resolve(const std::string &policySpaceName)
Retrieve an instance of Space from the default managed object store by constructing its URI from the ...
Definition: Space.hpp:192
void resolveGbpAllowDenyAction(std::vector< boost::shared_ptr< modelgbp::gbp::AllowDenyAction > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::AllowDenyAction.
Definition: Space.hpp:312
boost::optional< boost::shared_ptr< modelgbp::gbp::EpGroup > > resolveGbpEpGroup(const std::string &gbpEpGroupName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:389
static void unregisterListener(opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class from the default framework instance.
Definition: Space.hpp:819
void resolveGbpBridgeDomain(std::vector< boost::shared_ptr< modelgbp::gbp::BridgeDomain > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::BridgeDomain.
Definition: Space.hpp:492
void resolveGbpEpGroup(std::vector< boost::shared_ptr< modelgbp::gbp::EpGroup > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::EpGroup.
Definition: Space.hpp:432
static boost::optional< boost::shared_ptr< modelgbp::gbp::RoutingDomain > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of RoutingDomain from the managed object store.
Definition: RoutingDomain.hpp:242
static boost::optional< boost::shared_ptr< modelgbp::policy::Space > > resolve(const opflex::modb::URI &uri)
Retrieve an instance of Space from the managed object store using the default framework instance...
Definition: Space.hpp:148
static void unregisterListener(opflex::ofcore::OFFramework &framework, opflex::modb::ObjectListener *listener)
Unregister a listener from updates to this class.
Definition: Space.hpp:805
boost::shared_ptr< modelgbp::gbp::BridgeDomain > addGbpBridgeDomain(const std::string &gbpBridgeDomainName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:467
static boost::optional< boost::shared_ptr< modelgbp::gbp::EpGroup > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of EpGroup from the managed object store.
Definition: EpGroup.hpp:194
static boost::optional< boost::shared_ptr< modelgbp::gbp::BridgeDomain > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of BridgeDomain from the managed object store.
Definition: BridgeDomain.hpp:174
static boost::optional< boost::shared_ptr< modelgbp::gbp::AllowDenyAction > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of AllowDenyAction from the managed object store.
Definition: AllowDenyAction.hpp:214
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
static boost::optional< boost::shared_ptr< modelgbp::gbpe::L24Classifier > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of L24Classifier from the managed object store.
Definition: L24Classifier.hpp:662
boost::shared_ptr< modelgbp::gbp::Contract > addGbpContract(const std::string &gbpContractName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:347
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: Space.hpp:774
boost::optional< boost::shared_ptr< modelgbp::gbp::Contract > > resolveGbpContract(const std::string &gbpContractName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:329
boost::shared_ptr< modelgbp::gbpe::L24Classifier > addGbpeL24Classifier(const std::string &gbpeL24ClassifierName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:227
boost::shared_ptr< modelgbp::gbp::AllowDenyAction > addGbpAllowDenyAction(const std::string &gbpAllowDenyActionName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:287
boost::shared_ptr< modelgbp::gbp::Subnets > addGbpSubnets(const std::string &gbpSubnetsName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:647
boost::optional< boost::shared_ptr< modelgbp::gbp::BridgeDomain > > resolveGbpBridgeDomain(const std::string &gbpBridgeDomainName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:449
modelgbp::policy::Space & setName(const std::string &newValue)
Set name to the specified value in the currently-active mutator.
Definition: Space.hpp:101
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: Space.hpp:793
static boost::optional< boost::shared_ptr< modelgbp::policy::Space > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of Space from the managed object store.
Definition: Space.hpp:130
void resolveGbpSubnets(std::vector< boost::shared_ptr< modelgbp::gbp::Subnets > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::Subnets.
Definition: Space.hpp:672
const std::string & getName(const std::string &defaultValue)
Get the value of name if set, otherwise the value of default passed in.
Definition: Space.hpp:88
void resolveGbpFloodDomain(std::vector< boost::shared_ptr< modelgbp::gbp::FloodDomain > > &out)
Resolve and retrieve all of the immediate children of type modelgbp::gbp::FloodDomain.
Definition: Space.hpp:552
boost::shared_ptr< modelgbp::gbp::RoutingDomain > addGbpRoutingDomain(const std::string &gbpRoutingDomainName)
Create a new child object with the specified naming properties and make it a child of this object in ...
Definition: Space.hpp:587
boost::optional< boost::shared_ptr< modelgbp::gbp::Subnets > > resolveGbpSubnets(const std::string &gbpSubnetsName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:629
boost::optional< const std::string & > getName()
Get the value of name if it has been set.
Definition: Space.hpp:76
bool isNameSet()
Check whether name has been set.
Definition: Space.hpp:67
static boost::optional< boost::shared_ptr< modelgbp::gbp::FloodDomain > > resolve(opflex::ofcore::OFFramework &framework, const opflex::modb::URI &uri)
Retrieve an instance of FloodDomain from the managed object store.
Definition: FloodDomain.hpp:338
boost::optional< boost::shared_ptr< modelgbp::gbp::AllowDenyAction > > resolveGbpAllowDenyAction(const std::string &gbpAllowDenyActionName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:269
SOME COPYRIGHT.
Definition: OpcodeEnumT.hpp:12
boost::optional< boost::shared_ptr< modelgbp::gbp::RoutingDomain > > resolveGbpRoutingDomain(const std::string &gbpRoutingDomainName)
Retrieve the child object with the specified naming properties.
Definition: Space.hpp:569