livenson / opennode-demo-api

Demo API for Opennode
2 stars 1 forks source link

Storage should report its usage. #7

Open livenson opened 13 years ago

mkmik commented 13 years ago

As we discussed the other day, we have yet to decide if the storage displayed in this tab is the storage "provided" or the storage "used" by the compute.

I assume this tab is about the "provided" storage, while the "used" storage would go in the system tab. But in this case it makes sense to hide this tab if the compute has no virtualization container.

livenson commented 13 years ago

I support this. For "provided" storage the tab perhaps be named the same way, but its functionality should be slightly different.

mkmik commented 13 years ago

Just a nomenclature question.

There is a model called Storage in OMS.

class Storage(Model):
    def __init__(self, size, state):
        self.id = 1 # UID
    self.name = "Local storage" # description
    self.path = '/storagemount/local'
    self.type = local # local | shared 
    self.size = size  # 1.1 GiB
    self.used_size = 0 
        self.state = state  # online | offline | backup | snapshot | resize | degraded

I assume it's this is a storage volume, right?

We also have to define StoragePools.

What does ONC's storage tab display? StoragePools or StorageVolumes?

livenson commented 13 years ago

that's a storage pool. In ONC storage tab of a phys. node displays storage pools + volumes defined. a virt node should have smth else - perhaps output of df/mount?