Skip to content

OSAC-3145: PRD: Metering for Networking Resources - #159

Merged
openshift-merge-bot[bot] merged 9 commits into
osac-project:mainfrom
masayag:prd/OSAC-3145
Aug 11, 2026
Merged

openshift-merge-bot[bot] merged 9 commits into
osac-project:mainfrom
masayag:prd/OSAC-3145

Conversation

@masayag

@masayag masayag commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add PRD for networking resource metering (Part 2c of the Metering Part 2 family)
  • Covers VirtualNetworks, Subnets, SecurityGroups, PublicIPs, ExternalIPs, NATGateways
  • Allocation-based metering from READY/ALLOCATED state to deletion, including unattached IP metering

Jira

Related PRDs

Assisted-by: Claude Code noreply@anthropic.com

Summary by CodeRabbit

  • Documentation
    • Added a product requirements document for networking metering.
    • Defined allocation-based metering for VirtualNetworks, Subnets, SecurityGroups, ExternalIPs, NATGateways, and ExternalIPAttachments.
    • Documented unattached IP tracking, parent-child attribution, resource-second measurement, query dimensions, and acceptance criteria.
    • Included Part 1 dependencies, assumptions, risks, document provenance, and an open question regarding VirtualNetwork PENDING versus READY states.

@openshift-ci-robot

openshift-ci-robot commented Jul 26, 2026 •

Copy link
Copy Markdown

@masayag: This pull request references OSAC-3145 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add PRD for networking resource metering (Part 2c of the Metering Part 2 family)
  • Covers VirtualNetworks, Subnets, SecurityGroups, PublicIPs, ExternalIPs, NATGateways
  • Allocation-based metering from READY/ALLOCATED state to deletion, including unattached IP metering

Jira

Related PRDs

Assisted-by: Claude Code noreply@anthropic.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from gamli75 and mennyaboush July 26, 2026 09:32
@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@masayag, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e1da9ba6-df12-4ed2-867c-8a546480d485

📥 Commits

Reviewing files that changed from the base of the PR and between 2c5bc7d and 7e17b1c.

📒 Files selected for processing (1)
  • enhancements/OSAC-3145-metering-networking/prd.md

Walkthrough

Adds the OSAC-3145 PRD for networking metering. It defines resource scope, allocation-based usage measurement, dimensions, attribution, acceptance criteria, dependencies, risks, and the VirtualNetwork metering start-state question.

Changes

Networking Metering

Layer / File(s) Summary
Networking metering scope
enhancements/OSAC-3145-metering-networking/prd.md
Defines allocation metering for networking resources, attachment tracking, excluded areas, capabilities, and user stories.
Networking usage measurement
enhancements/OSAC-3145-metering-networking/prd.md
Defines resource-second meters, lifecycle boundaries, query dimensions, unattached ExternalIP tracking, parent-child attribution, infrastructure reuse, and acceptance criteria.
PRD dependencies and provenance
enhancements/OSAC-3145-metering-networking/prd.md
Documents assumptions, Part 1 dependencies, implementation risks, the VirtualNetwork start-state question, related Part 2 PRDs, and document metadata.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: gamli75, mennyaboush

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning AI use is attributed with Assisted-by, but PR commits also contain Co-Authored-By: Claude noreply@anthropic.com, which this check forbids. Remove all Co-Authored-By trailers that identify AI tools, while retaining Assisted-by or Generated-by attribution for the AI contribution.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the OSAC-3145 PRD and its focus on metering for networking resources.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed The PR changes only a Markdown PRD. Added lines contain no private keys, credential URLs, secret assignments, or encoded secret blobs; the only long match is prose resource names.
No-Weak-Crypto ✅ Passed The only changed file is a networking PRD; its full diff contains no weak-crypto algorithms, custom crypto, or secret/token comparisons.
No-Injection-Vectors ✅ Passed The PR changes only one Markdown PRD; scans of the full file and added lines found no SQL concatenation, shell execution, unsafe deserialization, eval/exec, yaml.load, or HTML injection.
Container-Privileges ✅ Passed The PR changes only a Markdown PRD; no container or Kubernetes manifests, privilege settings, capabilities, host namespaces, or root execution markers are present.
No-Sensitive-Data-In-Logs ✅ Passed The PR changes only a Markdown PRD. The added lines contain no logging calls or logged secrets, credentials, tokens, session IDs, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@enhancements/OSAC-3145-metering-networking/prd.md`:
- Line 47: Clarify the parent-child attribution rule for Subnets in the
“Parent-child attribution” requirement: define whether a subnet has one owner,
its allocation seconds are split among connected parents, or the resulting
parent metrics are explicitly non-additive. Ensure the selected rule prevents
the same subnet allocation seconds from being counted multiple times in
aggregated parent usage.
- Line 15: Resolve the allocation metering start-state contradiction across the
glossary, problem statement, CAP-1, acceptance criteria, open question, and
referenced sections. Choose and consistently document whether each resource’s
metering starts at creation/provisioning or when it reaches READY/ALLOCATED,
explicitly defining the VirtualNetwork behavior so implementations calculate the
same resource-second totals.
- Around line 104-105: Add acceptance criteria covering the PublicIPAttachment
and ExternalIPAttachment meters, specifying that attachment-duration usage is
emitted correctly when resources are attached and detached. Keep the existing
allocation-meter and parent-attribution criteria intact, and make the criterion
observable and verifiable.
- Around line 45-47: Update the networking metering requirements to define
attachment lifecycle independently from resource allocation: specify that
attachment usage starts when an attachment becomes active and stops when it is
detached or deleted. Clarify that IP allocation metering follows the
READY/ALLOCATED-to-deletion interval separately and must not accrue attachment
usage while an IP is unattached or after detachment, including the corresponding
sections referenced by the comment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: df058e47-e284-4cbf-b7d0-2ff5734217ae

📥 Commits

Reviewing files that changed from the base of the PR and between 4e8ad80 and 1119504.

📒 Files selected for processing (1)
  • enhancements/OSAC-3145-metering-networking/prd.md

Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated
Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated
Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated
Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@enhancements/OSAC-3145-metering-networking/prd.md`:
- Line 96: Update the metering-dimensions statement near “Each networking
resource type” to include all CAP-2/CAP-3 dimensions: resource type, network
class for VirtualNetworks, IP family, region, tenant, project, and attachment
status.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 92f32929-1dde-4ddb-a913-89c5d487cef1

📥 Commits

Reviewing files that changed from the base of the PR and between 1119504 and db48bbe.

📒 Files selected for processing (1)
  • enhancements/OSAC-3145-metering-networking/prd.md

Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated
@osac-project osac-project deleted a comment from github-actions Bot Jul 27, 2026
@osac-project osac-project deleted a comment from github-actions Bot Jul 27, 2026
@osac-project osac-project deleted a comment from github-actions Bot Jul 27, 2026
@github-actions

Copy link
Copy Markdown

AI EP Review: EP-159

Score: 10/10 | Verdict: PASS

Criterion Score Notes
WHAT (clear need) 2/2 Clear capability: allocation-based metering for networking resources (VirtualNetwork, Subnet, SecurityGroup, PublicIP, ExternalIP, NATGateway). All four OSAC personas (Cloud Provider Admin, Cloud Infrastructure Admin, Tenant Admin, Tenant User) have dedicated user stories under persona headings. Service coverage matrix (VMaaS, CaaS, BMaaS) is explicit. Relevant cross-cutting dimensions addressed; UI and bandwidth metering explicitly out of scope with Jira references.
WHY (justification) 2/2 Concrete justification in the Problem Statement: networking resources consume provider capacity from provisioning to deletion (finite IP pool space, VLAN allocation) but OSAC has no mechanism to track this consumption. Names the specific pain (no usage data for Cloud Provider Admins to account for tenant networking consumption, no visibility for Tenant Admins into their networking footprint). Ties to operational need with concrete examples (public IP pool is finite, each allocation reduces avail
User-Facing Focus 2/2 PRD stays user-focused throughout. Uses OSAC platform vocabulary correctly (VirtualNetwork, PublicIP, READY/ALLOCATED states are user-observable API states). Usage measurement model defines metering units (resource-seconds), which is product specification, not implementation. One minor reference to 'event pipeline, provider adapters' in Risks section 10.1, but this is contextualized as a dependency name, not a design prescription. No controllers, reconcilers, playbooks, finalizers, or internal c
Right-Sized 2/2 Well-scoped to networking resource metering as a coherent unit within the Part 2 metering family. The three capabilities (allocation metering, unattached IP metering, parent-child attribution) are tightly coupled — you cannot ship useful networking metering without all three. The PRD explicitly separates from sibling features (BMaaS metering, storage metering, bandwidth metering) that can be delivered independently.
Testability 2/2 All seven acceptance criteria are verifiable by a PM or QA using the product: provision a resource and check usage data appears, allocate an unattached IP and verify usage data, query usage breakdowns by dimension, attach resources and verify parent attribution, check per-second granularity. No internal-only criteria (no controller reconciliation checks, no finalizer assertions).

Verdict: A strong, well-structured PRD that clearly defines networking metering as a user-facing capability with concrete personas, specific justification, clean separation from design concerns, focused scope within the metering family, and fully testable acceptance criteria.

Feedback: The user stories frame value through 'downstream systems' (e.g., 'so that downstream systems can track...') rather than direct user outcomes — consider reframing at least one story per persona to describe what the persona directly gains (e.g., 'so that I can identify which tenants are consuming the most IP address pool capacity'). The open question on PENDING vs READY metering start (11.1) is well-framed but would benefit from a decision deadline to avoid blocking design work. The minor mention of 'event pipeline, provider adapters' in Risk 10.1 could be replaced with a user-facing description of the dependency (e.g., 'Part 1 metering capability').

Critical (0)

None.

Important (0)

None.

Suggestions (3)

  1. User stories delegate value to 'downstream systems' rather than naming what the persona directly gains — e.g., Cloud Provider Admin story ends with 'so that downstream systems can track' rather than 'so that I can account for networking infrastructure costs per tenant'. While accurate for a metering-layer feature, reframing would strengthen the user-facing motivation.
  2. Risk 10.1 references internal implementation details ('event pipeline, provider adapters') — replace with user-facing dependency description like 'Part 1 metering capability' to maintain the PRD's otherwise clean separation from design.
  3. Open Question 11.1 (PENDING vs READY metering start) would benefit from a stated decision deadline or decision owner timeline to prevent it from blocking downstream design work.

Review cost

Model: claude-opus-4-6
Cost: $0.5666
Tokens: 6 in / 4.3k out
Cache: 154.8k read
Active time: 1m 38s
API calls: 0

@osac-project osac-project deleted a comment from github-actions Bot Aug 2, 2026
Comment on lines +36 to +37
| PublicIP | Yes | — | — |
| PublicIPAttachment | Yes (ComputeInstance) | — | — |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danmanor
What should be removed in this context? the entire tracking of ExternalIPAttachment? meaning it isn't a resource that requires metering for BM, Cluster and Compute Instance?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved — removed ExternalIPAttachment from metering scope entirely in 2c5bc7d. The attachment is a binding operation that consumes no independent provider capacity. The ExternalIP meter with the attached dimension (CAP-3) is sufficient for downstream systems to track whether the IP is actively in use.

Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated
masayag and others added 7 commits August 4, 2026 19:04
Add PRD for networking resource metering covering VirtualNetworks,
Subnets, SecurityGroups, PublicIPs, ExternalIPs, and NATGateways
with allocation-based metering from READY/ALLOCATED state to deletion.

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
Replace cost/billing/pricing language with metering-focused wording.
Add per-service scope table mapping each networking resource to
VMaaS/CaaS/BMaaS. Broaden parent-child attribution to cover all
attachment types (PublicIP, ExternalIP across all services). Clarify
BMaaS out-of-scope as compute-only. Add UI out-of-scope with rationale.

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
- Tighten glossary to match CAP-1 allocation start point
- Clarify attachment resource lifecycle in CAP-1
- Add acceptance criterion for attachment meter duration

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
Remove PublicIP resources per architecture change - PublicIP was removed from codebase (commits OSAC-2533/2534/2535) and replaced with ExternalIP across all services. Updated PRD to reflect current implementation where ExternalIP is the universal IP resource supporting VMaaS, CaaS, and BMaaS.

Changes:
- Remove PublicIP and PublicIPAttachment from services table
- Replace all PublicIP references with ExternalIP throughout document
- Update user stories, capabilities, usage model, and acceptance criteria
- Reflect that ExternalIP now supports attachment to ComputeInstance, Cluster, and BareMetalInstance

Assisted-by: Claude Code <noreply@anthropic.com>
@masayag

masayag commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @danmanor — PublicIP was removed from the codebase (commits OSAC-2533/2534/2535) and replaced with ExternalIP across all services. I've updated the PRD to reflect the current architecture where ExternalIP is the universal IP resource supporting VMaaS, CaaS, and BMaaS, and can attach to ComputeInstance, Cluster, and BareMetalInstance.

Changes made:

  • Removed PublicIP and PublicIPAttachment from services table
  • Replaced all PublicIP references with ExternalIP throughout the document
  • Updated user stories, capabilities, usage model, and acceptance criteria

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

AI EP Review: EP-159

Score: 8/10 | Verdict: PASS

Criterion Score Notes
WHAT (clear need) 2/2 Clear product capability: allocation-based metering for networking resources. All four canonical personas (Cloud Provider Admin, Cloud Infrastructure Admin, Tenant Admin, Tenant User) have distinct user stories under persona headings with differentiated scope and outcomes. Services (VMaaS, CaaS, BMaaS) are identified with a per-resource coverage table. OSAC dimensions addressed: networking (primary), installation (CAP-4 no separate infra), UI/billing explicitly deferred.
WHY (justification) 2/2 Concrete justification: names specific pain (no visibility into networking resource consumption), names who is affected (Cloud Provider Admins lack cross-tenant accounting, Tenant Admins lack footprint visibility), and provides causal reasoning (ExternalIPs consume finite pool space whether attached or not). Ties to broader metering strategy (Part 1 + Part 2a-d family).
User-Facing Focus 1/2 Mostly user-focused — describes observable data availability, queryable dimensions, and metering units. However, §10.1 Risks names internal components ('event pipeline, provider adapters'), §8 Assumptions references 'start/stop state semantics' (internal implementation detail), and §11.1 Open Questions discusses internal concerns ('backend infrastructure, VLAN allocation'). No controllers, reconcilers, playbooks, or finalizers named.
Right-Sized 1/2 Scope is coherent — all networking metering capabilities are interdependent and must ship together. However, the PRD is uneconomical: 6 non-template sections (Glossary, Capabilities §5, Usage Measurement Model §6, Acceptance Criteria §7, Risks §10, Open Questions §11, Related PRDs) and the same requirements stated three times across In Scope §2.2, Capabilities §5, and Acceptance Criteria §7 (e.g., 'VirtualNetwork, Subnet, SecurityGroup, ExternalIP, NATGateway are metered on allocation basis').
Testability 2/2 Acceptance criteria are concrete and verifiable by using the product: create a networking resource, verify usage data appears; allocate an unattached ExternalIP, verify it generates usage data; query usage by resource type/network class/IP family/region/tenant/project. The 'deduplication' mention in §7 is an internal behavior harder to verify externally, but does not undermine overall testability.

Verdict: A well-structured PRD with clear persona coverage and concrete justification, held back by non-template padding (6 extra sections) and minor design leakage in supporting sections.

Feedback: Trim non-template sections: remove the standalone Capabilities (§5) and Acceptance Criteria (§7) sections — the capabilities are already stated in In Scope (§2.2) and the acceptance criteria restate them a third time; fold any unique content from Capabilities into In Scope. Move Risks, Open Questions, and the Usage Measurement Model to the design document where they belong. Remove internal implementation references ('event pipeline, provider adapters' in §10.1, 'start/stop state semantics' in §8, 'backend infrastructure, VLAN allocation' in §11.1) — describe these concerns in user-observable terms or defer to the design EP.

Critical (0)

None.

Important (3)

  1. Non-template sections: Standalone Acceptance Criteria (§7) and Risks (§10) are explicitly flagged by the PRD template as content that belongs elsewhere. The Glossary defines 'Network class' which is already in osac-dimensions.md. Capabilities (§5), Usage Measurement Model (§6), Open Questions (§11), and Related PRDs are also outside the template — recommend moving Risks, Open Questions, and Usage Measurement Model to the design EP, and merging Capabilities into In Scope.
  2. Triple-stated requirements: The same networking metering scope is stated in In Scope §2.2 ('Networking resource allocation metering — metering for VirtualNetworks, Subnets, SecurityGroups, ExternalIPs, NATGateways...'), Capabilities §5.1 CAP-1 ('Tenant-facing networking resources (VirtualNetwork, Subnet, SecurityGroup, ExternalIP, NATGateway) are metered on an allocation basis...'), and Acceptance Criteria §7 ('Each tenant-facing networking resource (VirtualNetwork, Subnet, SecurityGroup, Extern
  3. Design leakage in supporting sections: §10.1 names internal components ('event pipeline, provider adapters'), §8 references internal behavior ('allocation meters use different start/stop state semantics'), and §11.1 discusses implementation-level concerns ('backend infrastructure, VLAN allocation'). Rewrite in user-observable terms or move to the design EP.

Suggestions (2)

  1. User stories use 'so that downstream systems can track/report/attribute' phrasing, framing value around system integration rather than direct persona benefit. Consider reframing: 'so that I can review networking costs per tenant' rather than 'so that downstream systems can track the network infrastructure each tenant consumes.'
  2. Open Question 11.1 (PENDING vs READY metering start) contains design-level analysis about 'backend infrastructure' and 'VLAN allocation.' The user-facing question is valid; the internal reasoning belongs in the design EP.

Review cost

Model: claude-opus-4-6
Cost: $0.4599
Tokens: 7 in / 7.2k out
Cache: 267.5k read
Active time: 2m 51s
API calls: 0

| SecurityGroup | Yes | Yes | Yes |
| NATGateway | Yes | Yes | Yes |
| ExternalIP | Yes | Yes | Yes |
| ExternalIPAttachment | Yes (ComputeInstance) | Yes (Cluster) | Yes (BareMetalInstance) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we meter the ExternalIPs, why do we care about the ExternalIPAttachment?
If the tenant is already metered and charged for the ExternalIP, why should anyone care if they are using it or not (attached or not)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — ExternalIPAttachment is a binding operation, not an independent resource that consumes provider capacity (no rack space, no address pool slot, no storage). The provider capacity consumed is the IP pool address, which is owned by the ExternalIP resource itself.

The ExternalIP meter with the attached dimension (CAP-3) already captures whether the IP is actively bound to a target, which is sufficient for downstream systems to derive attachment duration and distinguish active vs idle IP usage.

Removed ExternalIPAttachment from metering scope in 2c5bc7d — updated services table, capabilities, CAP-1, usage measurement model, and acceptance criteria.

ExternalIPAttachment is a binding operation, not an independent
resource that consumes provider capacity. The ExternalIP meter with
the `attached` dimension is sufficient for downstream systems to
derive attachment duration and distinguish active vs idle IP usage.

Addresses review feedback from ronniel1 and danmanor.

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@enhancements/OSAC-3145-metering-networking/prd.md`:
- Line 93: Clarify the sentence describing networking resource dimensions by
separating the general dimensions from the resource-specific dimensions with a
semicolon or by repeating “additionally” before the VirtualNetworks and
ExternalIPs clauses.
- Line 107: Update the networking usage acceptance criterion to include
ExternalIP attachment status, specifically distinguishing attached versus idle
usage, and clarify that network class and IP family dimensions apply to the
relevant resource types. Keep the existing breakdown dimensions while ensuring
CAP-3 coverage cannot be satisfied without reporting ExternalIP attachment
state.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e673786-6258-4a1e-a7ed-532b35159325

📥 Commits

Reviewing files that changed from the base of the PR and between ccbdec5 and 2c5bc7d.

📒 Files selected for processing (1)
  • enhancements/OSAC-3145-metering-networking/prd.md

Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated
Comment thread enhancements/OSAC-3145-metering-networking/prd.md Outdated
@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

AI EP Review: EP-159

Score: 8/10 | Verdict: PASS

Criterion Score Notes
WHAT (clear need) 2/2 Clear, specific user-facing need. All four canonical personas have dedicated headings with distinct, non-duplicated user stories reflecting genuinely different visibility scopes (cross-tenant, per-network-class, per-org, per-project). Affected services (VMaaS, CaaS, BMaaS) are identified per resource type. Capabilities are concrete: allocation metering for five networking resource types, unattached IP tracking, parent-child attribution.
WHY (justification) 2/2 Concrete justification with a clear causal chain. The problem statement names the specific pain (no mechanism to track networking resource consumption), explains the real-world consequence (finite IP pool, each allocation reduces availability), and identifies who is affected (Cloud Provider Admins lack cross-tenant usage data, Tenant Admins lack visibility into networking footprint). The ExternalIP pool exhaustion argument is particularly well-grounded.
User-Facing Focus 1/2 Core content (problem statement, user stories, in/out of scope) is user-focused. However, supporting sections leak internal details: Risks names 'event pipeline, provider adapters' (internal components); Assumptions references 'start/stop state semantics'; Open Questions discusses 'backend infrastructure (network configuration, VLAN allocation)'; CAP-4 and AC-6 mention 'deduplication' which is an internal pipeline behavior not verifiable by using the product. These are contextual rather than pre
Right-Sized 1/2 Scope is coherent — all capabilities serve networking metering and depend on each other. However, the PRD treats this scope uneconomically. The same requirements are restated across In Scope (2.2), Capabilities (5), and Acceptance Criteria (7) — e.g., 'metered from READY/ALLOCATED state to deletion' appears three times. CAP-3's justification nearly duplicates the Problem Statement. Six sections fall outside the PRD template (Glossary, Capabilities, Usage Measurement Model, Acceptance Criteria, R
Testability 2/2 Requirements are verifiable by provisioning networking resources and checking metering output. Acceptance criteria are concrete and scenario-based: create a resource, confirm usage data is generated; allocate an unattached ExternalIP, confirm it generates data; query by resource type, network class, IP family, etc. Minor concern: 'deduplication' in AC-6 is hard for a PM to verify from outside, and 'consistent with Part 1 metering' requires knowledge of Part 1's specifics — but the other five cri

Verdict: A well-scoped PRD with clear personas and concrete justification, held back by design leakage in supporting sections and significant restatement of the same requirements across three sections.

Feedback: Consolidate the triple-stated requirements: In Scope (2.2), Capabilities (5), and Acceptance Criteria (7) all describe the same set of requirements — pick one authoritative location and reference it from the others, or merge Capabilities into In Scope and keep Acceptance Criteria as the verification lens only. Remove internal component names ('event pipeline', 'provider adapters', 'backend infrastructure', 'deduplication') from the PRD — move these to the design document where they belong. The Glossary, Risks, Open Questions, and Usage Measurement Model sections are outside the PRD template; consider moving Risks and Open Questions to the design EP, and folding the Usage Measurement Model into In Scope or Capabilities.

Critical (0)

None.

Important (3)

  1. Design leakage in supporting sections: §10 Risks names 'event pipeline, provider adapters' (internal components not in OSAC platform vocabulary); §8 Assumptions references 'start/stop state semantics'; §11 Open Questions discusses 'backend infrastructure (network configuration, VLAN allocation)'; CAP-4/AC-6 mention 'deduplication' — an internal pipeline behavior. Rewrite these in user-observable terms or move to the design document.
  2. Requirements restated three times: the same capabilities appear in §2.2 (In Scope), §5 (Capabilities), and §7 (Acceptance Criteria). Example: 'metered from READY/ALLOCATED state to deletion' in all three. CAP-3's justification ('An allocated-but-unattached IP consumes address pool space...the provider's pool is finite and each allocation reduces availability') near-duplicates the Problem Statement. Consolidate to state each requirement once.
  3. Non-template sections: Glossary, Capabilities (§5), Usage Measurement Model (§6), Acceptance Criteria (§7), Risks (§10), Open Questions (§11), and Related PRDs are all outside prd_template.md's defined sections. The Glossary defines 'network class' which is standard OSAC platform vocabulary. Recommend trimming Glossary to 'allocation metering' only, moving Risks/Open Questions to the design EP, and folding Usage Measurement Model into In Scope.

Suggestions (2)

  1. User stories all end with 'so that downstream systems can...' — consider reframing the outcomes in terms of what the persona can then do or decide, rather than what downstream systems consume. For example, 'so that I can account for the network infrastructure each tenant holds' rather than 'so that downstream systems can track...'.
  2. The Usage Measurement Model table (§6) shows identical 'resource-seconds' for all five resource types with the same 30-day example — consider whether this table adds information beyond what CAP-1 already states, or simplify to a single statement that all networking resources use resource-seconds as the metering unit.

Review cost

Model: claude-opus-4-6
Cost: $0.7764
Tokens: 7 in / 8.8k out
Cache: 220.1k read
Active time: 3m 2s
API calls: 0

- Add semicolons to usage measurement model intro for unambiguous
  resource-to-dimension mapping
- Update acceptance criterion to explicitly require attachment status
  for ExternalIPs (CAP-3 coverage)

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Moti Asayag <masayag@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

AI EP Review: EP-159

Score: 9/10 | Verdict: PASS

Criterion Score Notes
WHAT (clear need) 2/2 Clear capability: allocation metering for five networking resource types. All four canonical personas (Cloud Provider Admin, Cloud Infrastructure Admin, Tenant Admin, Tenant User) have user stories under dedicated headings. Services (VMaaS, CaaS, BMaaS) are declared with a per-resource coverage table. Cross-cutting dimensions addressed: networking is the core focus, storage/bandwidth/billing/UI explicitly out of scope.
WHY (justification) 2/2 Concrete justification in the Problem Statement: networking resources consume provider capacity from provisioning to deletion regardless of active use. Specific example — an ExternalIP consumes finite address pool space whether attached or not. Names the affected personas and their pain: Cloud Provider Admins lack usage data for accountability, Tenant Admins lack visibility into their networking footprint.
User-Facing Focus 2/2 The PRD describes user-observable outcomes (usage data availability, queryable dimensions, allocation-based metering from READY/ALLOCATED to deletion) without naming controllers, reconcilers, playbooks, or internal conditions. READY/ALLOCATED are user-visible resource states. CAP-4's 'no separate infrastructure' is an operational constraint rather than design leakage. Platform vocabulary (VirtualNetwork, Subnet, SecurityGroup, ExternalIP, NATGateway, network class) used correctly.
Right-Sized 1/2 Scope is coherent — all capabilities serve one feature (networking allocation metering). No bundling issue. However, the PRD is uneconomical: the same requirements are stated in §2.2 In Scope, §5 Capabilities, and §7 Acceptance Criteria (e.g., allocation metering for the five resource types appears verbatim three times). Six sections fall outside the PRD template (Glossary, Capabilities, Usage Measurement Model, Acceptance Criteria, Risks, Open Questions/Related PRDs), adding bulk without new in
Testability 2/2 All requirements are PM/QA-verifiable by using the product: create each networking resource type and verify usage data is generated; allocate an unattached ExternalIP and confirm metering; query usage by resource type, network class, tenant, project; verify parent-child attribution. Acceptance criteria describe end-to-end scenarios, not implementation checklists.

Verdict: A clear, well-justified, and testable PRD for networking allocation metering that covers all four personas and three services, held back from a perfect score by significant verbosity — the same requirements are restated across In Scope, Capabilities, and Acceptance Criteria, and six non-template sections add bulk without proportional value.

Feedback: Consolidate the three places where core requirements are stated (§2.2 In Scope, §5 Capabilities, §7 Acceptance Criteria) — state each requirement once in In Scope, then write acceptance criteria as end-to-end verification scenarios rather than restatements. Remove non-template sections: fold the Glossary's 'allocation metering' definition into the Problem Statement, move the Usage Measurement Model table and Risks to the design EP, and convert the Open Question into a TBD assumption. The PRD's content is strong; the issue is purely structural — a reader shouldn't need to cross-reference three sections to confirm they're reading the same requirement.

Critical (0)

None.

Important (2)

  1. Non-template sections: The PRD includes a Glossary (before §1), standalone Capabilities (§5), Usage Measurement Model (§6), Acceptance Criteria (§7), and Risks (§10) — none of these appear in the PRD template. The Glossary's 'Network class' definition restates osac-dimensions.md. The Risks section belongs in the design EP. Recommend trimming or moving this content.
  2. Restatement across sections: The core requirements (allocation metering for 5 resource types from READY/ALLOCATED to deletion, unattached IP metering, parent-child attribution) are stated in §2.2 In Scope, §5 Capabilities, and §7 Acceptance Criteria. For example, 'metering for VirtualNetworks, Subnets, SecurityGroups, ExternalIPs, and NATGateways from READY/ALLOCATED state to deletion' appears in all three sections with only minor wording changes. Recommend consolidating §5 Capabilities into §2.

Suggestions (3)

  1. The Usage Measurement Model table (§6) repeats the same unit (resource-seconds) and example (2,592,000) for all five resource types — a single sentence stating that all networking resources use resource-seconds would suffice in the PRD, with the detailed table deferred to the design EP.
  2. Open Question §11.1 (PENDING vs READY metering start) could be captured as a TBD assumption under §8 Assumptions, keeping the document within the template's section structure.
  3. The Related PRDs section (§13) is informational context that could be a one-line reference in the Problem Statement or In Scope rather than a standalone section.

Review cost

Model: claude-opus-4-6
Cost: $0.6776
Tokens: 7 in / 6.2k out
Cache: 221.8k read
Active time: 2m 22s
API calls: 0

@danmanor

danmanor commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Note: Networking resource metering vs. industry practice

I did a market survey across hyperscalers and GPU/AI cloud competitors to see how the proposed metering model compares.

The industry is unanimous: virtual networks, subnets, and security groups are free everywhere. No provider — hyperscaler or GPU cloud — charges for these or meters them on an allocation basis. The only networking resources that get allocation-based metering/billing are ones that consume scarce infrastructure:

  • Public IPv4 addresses — charged by every hyperscaler (~$3.65/mo) and most GPU clouds ($0.50–$4/mo). Some charge double for idle/unattached IPs. This is driven by finite IPv4 pool scarcity.
  • NAT Gateways — charged by hyperscalers (~$32/mo + per-GB). Free on GPU clouds.

The PRD correctly states that metering is data collection only — billing decisions are deferred to a separate PRD. That said, the PRD treats all six resource types identically (same resource-seconds unit, same allocation model, same acceptance criteria) without distinguishing between resources that consume scarce infrastructure (ExternalIP, NATGateway) and resources that are configuration metadata (VirtualNetwork, Subnet, SecurityGroup). The problem statement argues that "a VirtualNetwork consumes backend network configuration and VLAN allocation from creation" — but no cloud provider treats that as a metered cost driver.

This is just a note for awareness — if you want to proceed with metering all six resource types uniformly, I'm fine with approving.

@ronniel1

ronniel1 commented Aug 6, 2026

Copy link
Copy Markdown

Note: Networking resource metering vs. industry practice

I did a market survey across hyperscalers and GPU/AI cloud competitors to see how the proposed metering model compares.

The industry is unanimous: virtual networks, subnets, and security groups are free everywhere. No provider — hyperscaler or GPU cloud — charges for these or meters them on an allocation basis. The only networking resources that get allocation-based metering/billing are ones that consume scarce infrastructure:

  • Public IPv4 addresses — charged by every hyperscaler (~$3.65/mo) and most GPU clouds ($0.50–$4/mo). Some charge double for idle/unattached IPs. This is driven by finite IPv4 pool scarcity.
  • NAT Gateways — charged by hyperscalers (~$32/mo + per-GB). Free on GPU clouds.

The PRD correctly states that metering is data collection only — billing decisions are deferred to a separate PRD. That said, the PRD treats all six resource types identically (same resource-seconds unit, same allocation model, same acceptance criteria) without distinguishing between resources that consume scarce infrastructure (ExternalIP, NATGateway) and resources that are configuration metadata (VirtualNetwork, Subnet, SecurityGroup). The problem statement argues that "a VirtualNetwork consumes backend network configuration and VLAN allocation from creation" — but no cloud provider treats that as a metered cost driver.

This is just a note for awareness — if you want to proceed with metering all six resource types uniformly, I'm fine with approving.

@danmanor I think this really make sense.
@masayag I'm not sure if we should meter stuff that do not incurs cost. Whats the point?

@masayag

masayag commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Note: Networking resource metering vs. industry practice

I did a market survey across hyperscalers and GPU/AI cloud competitors to see how the proposed metering model compares.
The industry is unanimous: virtual networks, subnets, and security groups are free everywhere. No provider — hyperscaler or GPU cloud — charges for these or meters them on an allocation basis. The only networking resources that get allocation-based metering/billing are ones that consume scarce infrastructure:

  • Public IPv4 addresses — charged by every hyperscaler (~$3.65/mo) and most GPU clouds ($0.50–$4/mo). Some charge double for idle/unattached IPs. This is driven by finite IPv4 pool scarcity.
  • NAT Gateways — charged by hyperscalers (~$32/mo + per-GB). Free on GPU clouds.

The PRD correctly states that metering is data collection only — billing decisions are deferred to a separate PRD. That said, the PRD treats all six resource types identically (same resource-seconds unit, same allocation model, same acceptance criteria) without distinguishing between resources that consume scarce infrastructure (ExternalIP, NATGateway) and resources that are configuration metadata (VirtualNetwork, Subnet, SecurityGroup). The problem statement argues that "a VirtualNetwork consumes backend network configuration and VLAN allocation from creation" — but no cloud provider treats that as a metered cost driver.
This is just a note for awareness — if you want to proceed with metering all six resource types uniformly, I'm fine with approving.

@danmanor I think this really make sense. @masayag I'm not sure if we should meter stuff that do not incurs cost. Whats the point?

The purpose of the metering service is to provide data for the billing. We don't rely on it for Quota or to show all of the resources used by specific user. This isn't the scope nor purpose of the metering. Therefore I agree - if we're not going to incur cost for the resources - then we should not report them.

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danmanor, masayag

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 3d09b39 into osac-project:main Aug 11, 2026
5 checks passed
openshift-merge-bot Bot pushed a commit that referenced this pull request Aug 24, 2026
Corrects the merged PRD (#159), which metered VirtualNetwork, Subnet, and
SecurityGroup on an allocation basis. Per review comment 5204380439, these
are configuration metadata that incur no cost and are free across every
surveyed hyperscaler and GPU/AI cloud, none of which meter them on an
allocation basis. Metering is now limited to the scarce-infrastructure
resources ExternalIP and NATGateway; the three free resources are moved to
Out of Scope with the industry-practice rationale, and a negative acceptance
criterion asserts they generate no usage data.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
empovit pushed a commit to empovit/osac-enhancement-proposals that referenced this pull request Aug 31, 2026
Corrects the merged PRD (osac-project#159), which metered VirtualNetwork, Subnet, and
SecurityGroup on an allocation basis. Per review comment 5204380439, these
are configuration metadata that incur no cost and are free across every
surveyed hyperscaler and GPU/AI cloud, none of which meter them on an
allocation basis. Metering is now limited to the scarce-infrastructure
resources ExternalIP and NATGateway; the three free resources are moved to
Out of Scope with the industry-practice rationale, and a negative acceptance
criterion asserts they generate no usage data.

Assisted-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Moti Asayag <masayag@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants