Skip to content
  • Chip Vincent's avatar
    (#2) Add DCN ACL classes & providers · 05ff373e
    Chip Vincent authored
    
    
    Changes in this version:
    #2 - Scoped code to primary use case: link network interfaces to
    existing fitlers.
    - Updated copyright year in a few places.
    - Fixed octets_to_cmpi() to work when called from an associattion provider
    
    This patch adds several new classes and providers to add support for filter
    rules and filter lists.
    
    The patch is rather large since all aspects are intertwined.
    Here's an overview of the implementation:
    
    libxkutil:
    The instrumentation is implemented in acl_parsing.c/.h since this function
    is essentially independent of the device and/or pool parsing. ACLs are
    associated to devices (via filterref) so there are some minor changes in
    device_parsing.c & xmlgen.c to support this.
    
    +libxkutil/acl_parsing.h & .c
    Adds several new structures to represent filters and rules. Since rules can
    only exist within the context of a filter, the main structure used in the APIs
    is acl_fitler.
    
    Also adds several new APIs to libxkutil to allow providers (see below) to
    convert acl_filter and acl_rule structures to CIM objects, and to support
    associations between themselves and existing resource (host system & network
    port).
    
    schema & providers:
    The ACL function does not map to an exiting profile so a subset of the
    classes defined in the CIM Network schema are used.
    
    +schema/FilterEntry.mof &.registration
    +src/FilterEntry.h & .c
    Adds two new classes to represent IP-level rules (IPHeadersFilter) and
    MAC-level (Hdr8021Filter). These classes include two new properties to
    surface libvirt features not defined by the schema (Direction & Priority).
    
    +schema/FilterList.mof & .registration
    +src/FilterList.h & .c
    Adds a class to represent ACL filters (FilterList)
    
    NOTE: Read-write. Requires Name property only.
    
    +schema/EntriesInFilterList.mof & .registration
    +src/EntriesInFilterList.c
    Adds a class to represent the relationship (association) between a filter
    (FilterList) and the rules it contains (IPHeadersFilter or Hdr8021Filter).
    
    +schema/NestedFilterList.mof & .registration
    +src/NestedFilterList.c
    Adds a class to represent filters that have references (filterref) to
    other pre-defined filters. This is not covered by the current schema so
    a new class was introduced to a) allow filters to reference each other, and
    b) do it in a way that allows the client to determine if a filter
    reference_s_ a filter or is reference_d_ by a filter.
    
    +schema/HostedFilterList.mof & .registration
    +src/HostedFilterList.c
    Adds a class to represent the relationship (association) between a filter
    and the computer system that hosts them. In the case of ACL filters, which
    are essentially defined once but available to all VMs, they are always linked
    to the host system (hypervisor) rather than the individual computer
    systems (VMs).
    
    +schema/AppliedFilterList.mof & .registration
    +src/AppliedFilterList.c
    Adds a class to represent the relationship (association) between a filter
    and a network port referencing it. This is not covered by the current schema
    so a new class was introduced.
    
    NOTE: New associations are created via CIM intrinsic methods (create/modify/
    delete). It requires the client to provide fully qualified object paths to
    the filter and network port so the providers can a) validate their existance,
    and b) apply the necessary links in the XML so new associations appear when
    queried.
    
    Signed-off-by: default avatarChip Vincent <cvincent@us.ibm.com>
    05ff373e