As a workaround create a meter label for every project itself:

import openstack
conn = openstack.connect(cloud='test')

def createBillingMeteringLabel(projectId):
    '''Creates Billing Label for internet exgress traffic for a project'''
    label = conn.network.create_metering_label(
            name='billing-exgres', project_id=projectId)
    conn.network.create_metering_label_rule(
        direction='egress',
        metering_label_id=label.id, project_id=projectId,
        remote_ip_prefix='0.0.0.0/0')
    privateCidrs = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
    for privateNet in privateCidrs:
        conn.network.create_metering_label_rule(
            direction='egress', is_excluded=True,
            metering_label_id=label.id, project_id=projectId,
            remote_ip_prefix=privateNet)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1837861

Title:
  Shared Neutron Meter Label not processed correctly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceilometer/+bug/1837861/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to