block_devices=client['SoftLayer_Virtual_Guest'].getBlockDevices(id=id)
This API call doesn't tell what is the size of the disks.
Is there any other way to get the disk size of a portable storage for a particular Virtual Server?
Try this:
objectMask='mask[capacity, name, id, description]'
objectFilter ={"portableStorageVolumes":{"blockDevices":{"guest":{"id":{"operation":VirtualGuestID}}}}}
result = client['Account'].getPortableStorageVolumes(filter=objectFilter, mask=objectMask)
Replace the VirtualGuestID with the ID of your virtual guest, the objectfilter will return all the portable storages that your VSI has and the objectMask will display their capacity for those stoages
Related
Is there a hard limit on the number of service accounts that can be created in Kubernetes?
I couldn't find any documentation where this is stated.
It depends on the storage behind a service account registry, as coded in kubernetes/kubernetes/pkg/registry/core/serviceaccount
// storage puts strong typing around storage calls
type storage struct {
rest.StandardStorage
}
// NewRegistry returns a new Registry interface for the given Storage. Any mismatched
// types will panic.
func NewRegistry(s rest.StandardStorage) Registry {
return &storage{s}
}
A storage is a REST call to, for instance, an ETCD storage.
func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
etcdStorage, server := registrytest.NewEtcdStorage(t, "")
So this is limited by the limits of an ETCD, not so much the number of entries, but rather the storage size.
I am using this request to get the credentials to the iSCSI disk 000001 for the virtual guest 000002:
GET /rest/v3.1/SoftLayer_Network_Storage_Iscsi/000001/getObject.json?objectMask=filteredMask[allowedVirtualGuests[allowedHost[credential]]]&objectFilter={"allowedVirtualGuests":{"id":000002}}
However, the result is the same as if I wouldn't apply the objectFilter part at all, resulting in the credentials for all virtual guests being returned, instead of the single one that I need.
What am I missing?
Try the following REST call:
GET /rest/v3.1/SoftLayer_Network_Storage_Iscsi/000001/getAllowedVirtualGuests?objectMask=mask[allowedHost[credential]]&objectFilter={"allowedVirtualGuests":{"id":{"operation":000002}}}
You can use object-filters when the method returns a list of objects, getObject returns only one which is the SoftLayer_Network_Storage_Iscsi itself, on the other hand the method getAllowedVirtualGuests returns a list of virtual guests.
I recommend to review the following links to know more about this:
http://sldn.softlayer.com/reference/services/softlayer_network_storage_iscsi/getallowedvirtualguests
https://sldn.softlayer.com/article/object-filters
How to use object filter with softlayer rest api?
We bind Server's name with it's object in rmi registry.And then look up the registry by the server's name or address.How does this keep the distributed System's single image intact as a user must not care about from where the data comes?
I don't know what you mean by 'the distributed system's single image', but the object you lookup in the Registry can be located anywhere, not just in the host containing the Registry. Although putting it somewhere else does take a little more work.
I want to expose some portion of my big REST resource as another resource (sub-resource). Is it valid to do so? What problems are possible with this approach? Is there a better way?
For example, I have a collection of computers. Each computer in this collection (main resource) have it's own sub-parts (sub-resources).
/api/computers/117/chassis
/api/computers/117/motherboard
/api/computers/117/cpu
Where computers is the collection and chassis, motherboard and cpu are sub-resources of computer #117.
Yes it is. You can have problems when you want to access only resources like a specific type of CPU, but it's okay if you have also /api/cpus/123
I'm trying to add a disk to a Subscription using the Add Disk REST service ( http://msdn.microsoft.com/en-us/library/windowsazure/jj157178.aspx )
I tried pretty much every combination explained but no matter what I do, the disk is listed as a Data Disk.
Trying use fiddler to inspect how the Azure PowerShell (https://www.windowsazure.com/en-us/manage/downloads/ ) just results in an error.
According to MS, you should specify HasOperatingSystem but you don’t supply it when using Microsoft’s PScmdlet. If you do a List Disks ( http://msdn.microsoft.com/en-us/library/windowsazure/jj157176 ) it should send this too, but the only way to distinct Data disks from OS disk’s is weather ”OS” is null or contains ”windows”/”Linux”. Given that information I tried creating the disk with/without OS and/or HasOperatingSystem in all combinations, and no matter what I always end up being a Data disk.
Using Microsoft PowerShell CDMLets allow using both HTTP and HTTPS in URI, so tried both of those too.
Does anyone have a WORKING example of the xml to send, to create an OS disk?
<Disk xmlns="http://schemas.microsoft.com/windowsazure">
<HasOperatingSystem>true</HasOperatingSystem>
<Label>d2luZ3VuYXY3MDEtbmF2NzAxLTAtMjAxMjA4MjcxNTA5NTU=</Label>
<MediaLink>http://winguvhd.blob.core.windows.net/nav701/nav701-0-20120827150955_osdisk.vhd</MediaLink>
<Name>wingunav701-nav701-0-20120827150955</Name>
<OS>Windows</OS>
</Disk>
As I mentioned in my comment, there is indeed an issue with the documentation.
Try this as your request payload. This was provided to me by the person from Microsoft who wrote Windows Azure PowerShell Cmdlets:
<Disk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/windowsazure">
<OS>Windows</OS>
<Label>mydisk.vhd</Label>
<MediaLink>https://vmdemostorage.blob.core.windows.net/uploads/mydisk.vhd</MediaLink>
<Name>mydisk.vhd</Name>
</Disk>
I just tried using the XML above, and I can see an OS Disk in my subscription.