fog / fog-vsphere

Fog for vSphere
MIT License
36 stars 63 forks source link

Add ability to create update and delete Resource Pools #253 #255

Closed rlazoryshchak closed 4 years ago

rlazoryshchak commented 4 years ago

Create

compute.create_resource_pool(
  datacenter: 'datacenter_name', 
  cluster: 'cluster_name', 
  name: 'resource_pool_name', 
  cpu: {reservation: '2000'},
  memory: {reservation: '512'}
)

Update

compute.update_resource_pool(
  datacenter: 'datacenter_name', 
  cluster: 'cluster_name', 
  name: 'new_resource_pool_name', 
  cpu: {reservation: '3000'},
  memory: {reservation: '1024'},
  ref: 'resource_pool_id'
)

Delete

compute.destroy_resource_pool(
  datacenter: 'datacenter_name', 
  cluster: 'cluster_name', 
  ref: 'resource_pool_id'
)
ezr-ondrej commented 4 years ago

Nice @rlazoryshchak! Do you want to follow up with the resources? These endpoints are used by the resources in models/compute for easier user access.

rlazoryshchak commented 4 years ago

@ezr-ondrej not sure. How I can do that?

chris1984 commented 4 years ago

@rlazoryshchak im going to test this and if it looks good we can merge it, @ezr-ondrej was saying in a separate PR. I can help you with that when we get this one merged.

rlazoryshchak commented 4 years ago

@chris1984 okay