github.com/altoros/juju-vmware@v0.0.0-20150312064031-f19ae857ccca/apiserver/params/internal.go (about) 1 // Copyright 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package params 5 6 import ( 7 "time" 8 9 "github.com/juju/utils/exec" 10 11 "github.com/juju/juju/constraints" 12 "github.com/juju/juju/instance" 13 "github.com/juju/juju/network" 14 "github.com/juju/juju/state/multiwatcher" 15 "github.com/juju/juju/storage" 16 "github.com/juju/juju/tools" 17 "github.com/juju/juju/version" 18 ) 19 20 // MachineContainersParams holds the arguments for making a SetSupportedContainers 21 // API call. 22 type MachineContainersParams struct { 23 Params []MachineContainers 24 } 25 26 // MachineContainers holds the arguments for making an SetSupportedContainers call 27 // on a given machine. 28 type MachineContainers struct { 29 MachineTag string 30 ContainerTypes []instance.ContainerType 31 } 32 33 // WatchContainer identifies a single container type within a machine. 34 type WatchContainer struct { 35 MachineTag string 36 ContainerType string 37 } 38 39 // WatchContainers holds the arguments for making a WatchContainers 40 // API call. 41 type WatchContainers struct { 42 Params []WatchContainer 43 } 44 45 // CharmURL identifies a single charm URL. 46 type CharmURL struct { 47 URL string 48 } 49 50 // CharmURLs identifies multiple charm URLs. 51 type CharmURLs struct { 52 URLs []CharmURL 53 } 54 55 // StringsResult holds the result of an API call that returns a slice 56 // of strings or an error. 57 type StringsResult struct { 58 Error *Error 59 Result []string 60 } 61 62 // PortsResults holds the bulk operation result of an API call 63 // that returns a slice of network.Port. 64 type PortsResults struct { 65 Results []PortsResult 66 } 67 68 // PortsResult holds the result of an API call that returns a slice 69 // of network.Port or an error. 70 type PortsResult struct { 71 Error *Error 72 // TODO(dimitern): Add explicit JSON serialization tags and use 73 // []string instead in order to break the dependency on the 74 // network package, as this potentially introduces hard to catch 75 // and debug wire-format changes in the protocol when the type 76 // changes! 77 Ports []network.Port 78 } 79 80 // MachinePorts holds a machine and network tags. It's used when 81 // referring to opened ports on the machine for a network. 82 type MachinePorts struct { 83 MachineTag string 84 NetworkTag string 85 } 86 87 // MachinePortRange holds a single port range open on a machine for 88 // the given unit and relation tags. 89 type MachinePortRange struct { 90 UnitTag string 91 RelationTag string 92 // TODO(dimitern): Add explicit JSON serialization tags and use 93 // string instead in order to break the dependency on the network 94 // package, as this potentially introduces hard to catch and debug 95 // wire-format changes in the protocol when the type changes! 96 PortRange network.PortRange 97 } 98 99 // MachinePortsParams holds the arguments for making a 100 // FirewallerAPIV1.GetMachinePorts() API call. 101 type MachinePortsParams struct { 102 Params []MachinePorts 103 } 104 105 // MachinePortsResult holds a single result of the 106 // FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() 107 // API calls. 108 type MachinePortsResult struct { 109 Error *Error 110 Ports []MachinePortRange 111 } 112 113 // MachinePortsResults holds all the results of the 114 // FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() 115 // API calls. 116 type MachinePortsResults struct { 117 Results []MachinePortsResult 118 } 119 120 // StringsResults holds the bulk operation result of an API call 121 // that returns a slice of strings or an error. 122 type StringsResults struct { 123 Results []StringsResult 124 } 125 126 // StringResult holds a string or an error. 127 type StringResult struct { 128 Error *Error 129 Result string 130 } 131 132 // StringResults holds the bulk operation result of an API call 133 // that returns a string or an error. 134 type StringResults struct { 135 Results []StringResult 136 } 137 138 // EnvironmentResult holds the result of an API call returning a name and UUID 139 // for an environment. 140 type EnvironmentResult struct { 141 Error *Error 142 Name string 143 UUID string 144 } 145 146 // EnvironmentSkeletonConfigArgs wraps the args for environmentmanager.SkeletonConfig. 147 type EnvironmentSkeletonConfigArgs struct { 148 Provider string 149 Region string 150 } 151 152 // EnvironmentCreateArgs holds the arguments that are necessary to create 153 // and environment. 154 type EnvironmentCreateArgs struct { 155 // OwnerTag represents the user that will own the new environment. 156 // The OwnerTag must be a valid user tag. If the user tag represents 157 // a local user, that user must exist. 158 OwnerTag string 159 160 // Account holds the provider specific account details necessary to 161 // interact with the provider to create, list and destroy machines. 162 Account map[string]interface{} 163 164 // Config defines the environment config, which includes the name of the 165 // environment. An environment UUID is allocated by the API server during 166 // the creation of the environment. 167 Config map[string]interface{} 168 } 169 170 // Environment holds the result of an API call returning a name and UUID 171 // for an environment. 172 type Environment struct { 173 Name string 174 UUID string 175 OwnerTag string 176 } 177 178 // EnvironmentList holds information about a list of environments. 179 type EnvironmentList struct { 180 Environments []Environment 181 } 182 183 // ResolvedModeResult holds a resolved mode or an error. 184 type ResolvedModeResult struct { 185 Error *Error 186 Mode ResolvedMode 187 } 188 189 // ResolvedModeResults holds the bulk operation result of an API call 190 // that returns a resolved mode or an error. 191 type ResolvedModeResults struct { 192 Results []ResolvedModeResult 193 } 194 195 // StringBoolResult holds the result of an API call that returns a 196 // string and a boolean. 197 type StringBoolResult struct { 198 Error *Error 199 Result string 200 Ok bool 201 } 202 203 // StringBoolResults holds multiple results with a string and a bool 204 // each. 205 type StringBoolResults struct { 206 Results []StringBoolResult 207 } 208 209 // BoolResult holds the result of an API call that returns a 210 // a boolean or an error. 211 type BoolResult struct { 212 Error *Error 213 Result bool 214 } 215 216 // BoolResults holds multiple results with BoolResult each. 217 type BoolResults struct { 218 Results []BoolResult 219 } 220 221 // Settings holds relation settings names and values. 222 type Settings map[string]string 223 224 // SettingsResult holds a relation settings map or an error. 225 type SettingsResult struct { 226 Error *Error 227 Settings Settings 228 } 229 230 // SettingsResults holds the result of an API calls that 231 // returns settings for multiple relations. 232 type SettingsResults struct { 233 Results []SettingsResult 234 } 235 236 // ConfigSettings holds unit, service or cham configuration settings 237 // with string keys and arbitrary values. 238 type ConfigSettings map[string]interface{} 239 240 // ConfigSettingsResult holds a configuration map or an error. 241 type ConfigSettingsResult struct { 242 Error *Error 243 Settings ConfigSettings 244 } 245 246 // ConfigSettingsResults holds multiple configuration maps or errors. 247 type ConfigSettingsResults struct { 248 Results []ConfigSettingsResult 249 } 250 251 // EnvironConfig holds an environment configuration. 252 type EnvironConfig map[string]interface{} 253 254 // EnvironConfigResult holds environment configuration or an error. 255 type EnvironConfigResult struct { 256 Config EnvironConfig 257 } 258 259 // RelationUnit holds a relation and a unit tag. 260 type RelationUnit struct { 261 Relation string 262 Unit string 263 } 264 265 // RelationUnits holds the parameters for API calls expecting a pair 266 // of relation and unit tags. 267 type RelationUnits struct { 268 RelationUnits []RelationUnit 269 } 270 271 // RelationIds holds multiple relation ids. 272 type RelationIds struct { 273 RelationIds []int 274 } 275 276 // RelationUnitPair holds a relation tag, a local and remote unit tags. 277 type RelationUnitPair struct { 278 Relation string 279 LocalUnit string 280 RemoteUnit string 281 } 282 283 // RelationUnitPairs holds the parameters for API calls expecting 284 // multiple sets of a relation tag, a local and remote unit tags. 285 type RelationUnitPairs struct { 286 RelationUnitPairs []RelationUnitPair 287 } 288 289 // RelationUnitSettings holds a relation tag, a unit tag and local 290 // unit settings. 291 type RelationUnitSettings struct { 292 Relation string 293 Unit string 294 Settings Settings 295 } 296 297 // RelationUnitsSettings holds the arguments for making a EnterScope 298 // or WriteSettings API calls. 299 type RelationUnitsSettings struct { 300 RelationUnits []RelationUnitSettings 301 } 302 303 // RelationResult returns information about a single relation, 304 // or an error. 305 type RelationResult struct { 306 Error *Error 307 Life Life 308 Id int 309 Key string 310 Endpoint multiwatcher.Endpoint 311 } 312 313 // RelationResults holds the result of an API call that returns 314 // information about multiple relations. 315 type RelationResults struct { 316 Results []RelationResult 317 } 318 319 // EntityPort holds an entity's tag, a protocol and a port. 320 type EntityPort struct { 321 Tag string 322 Protocol string 323 Port int 324 } 325 326 // EntitiesPorts holds the parameters for making an OpenPort or 327 // ClosePort on some entities. 328 type EntitiesPorts struct { 329 Entities []EntityPort 330 } 331 332 // EntityPortRange holds an entity's tag, a protocol and a port range. 333 type EntityPortRange struct { 334 Tag string 335 Protocol string 336 FromPort int 337 ToPort int 338 } 339 340 // EntitiesPortRanges holds the parameters for making an OpenPorts or 341 // ClosePorts on some entities. 342 type EntitiesPortRanges struct { 343 Entities []EntityPortRange 344 } 345 346 // EntityCharmURL holds an entity's tag and a charm URL. 347 type EntityCharmURL struct { 348 Tag string 349 CharmURL string 350 } 351 352 // EntitiesCharmURL holds the parameters for making a SetCharmURL API 353 // call. 354 type EntitiesCharmURL struct { 355 Entities []EntityCharmURL 356 } 357 358 // BytesResult holds the result of an API call that returns a slice 359 // of bytes. 360 type BytesResult struct { 361 Result []byte 362 } 363 364 // LifeResult holds the life status of a single entity, or an error 365 // indicating why it is not available. 366 type LifeResult struct { 367 Life Life 368 Error *Error 369 } 370 371 // LifeResults holds the life or error status of multiple entities. 372 type LifeResults struct { 373 Results []LifeResult 374 } 375 376 // MachineSetProvisioned holds a machine tag, provider-specific 377 // instance id, a nonce, or an error. 378 // 379 // NOTE: This is deprecated since 1.19.0 and not used by the 380 // provisioner, it's just retained for backwards-compatibility and 381 // should be removed. 382 type MachineSetProvisioned struct { 383 Tag string 384 InstanceId instance.Id 385 Nonce string 386 Characteristics *instance.HardwareCharacteristics 387 } 388 389 // SetProvisioned holds the parameters for making a SetProvisioned 390 // call for a machine. 391 // 392 // NOTE: This is deprecated since 1.19.0 and not used by the 393 // provisioner, it's just retained for backwards-compatibility and 394 // should be removed. 395 type SetProvisioned struct { 396 Machines []MachineSetProvisioned 397 } 398 399 // Network describes a single network available on an instance. 400 type Network struct { 401 // Tag is the network's tag. 402 Tag string 403 404 // ProviderId is the provider-specific network id. 405 ProviderId network.Id 406 407 // CIDR of the network, in "123.45.67.89/12" format. 408 CIDR string 409 410 // VLANTag needs to be between 1 and 4094 for VLANs and 0 for 411 // normal networks. It's defined by IEEE 802.1Q standard. 412 VLANTag int 413 } 414 415 // NetworkInterface describes a single network interface available on 416 // an instance. 417 type NetworkInterface struct { 418 // MACAddress is the network interface's hardware MAC address 419 // (e.g. "aa:bb:cc:dd:ee:ff"). 420 MACAddress string 421 422 // InterfaceName is the OS-specific network device name (e.g. 423 // "eth1", even for for a VLAN eth1.42 virtual interface). 424 InterfaceName string 425 426 // NetworkTag is this interface's network tag. 427 NetworkTag string 428 429 // IsVirtual is true when the interface is a virtual device, as 430 // opposed to a physical device. 431 IsVirtual bool 432 433 // Disabled returns whether the interface is disabled. 434 Disabled bool 435 } 436 437 // InstanceInfo holds a machine tag, provider-specific instance id, a 438 // nonce, a list of networks and interfaces to set up. 439 type InstanceInfo struct { 440 Tag string 441 InstanceId instance.Id 442 Nonce string 443 Characteristics *instance.HardwareCharacteristics 444 Networks []Network 445 Interfaces []NetworkInterface 446 Volumes []storage.BlockDevice 447 } 448 449 // InstancesInfo holds the parameters for making a SetInstanceInfo 450 // call for multiple machines. 451 type InstancesInfo struct { 452 Machines []InstanceInfo 453 } 454 455 // RequestedNetworkResult holds requested networks or an error. 456 type RequestedNetworkResult struct { 457 Error *Error 458 Networks []string 459 } 460 461 // RequestedNetworksResults holds multiple requested networks results. 462 type RequestedNetworksResults struct { 463 Results []RequestedNetworkResult 464 } 465 466 // NetworkInfo describes all the necessary information to configure 467 // all network interfaces on a machine. This mostly duplicates 468 // network.InterfaceInfo type and it's defined here so it can be kept 469 // separate and stable as definition to ensure proper wire-format for 470 // the API. 471 type NetworkInfo struct { 472 // DeviceIndex specifies the order in which the network interface 473 // appears on the host. The primary interface has an index of 0. 474 DeviceIndex int 475 476 // MACAddress is the network interface's hardware MAC address 477 // (e.g. "aa:bb:cc:dd:ee:ff"). 478 MACAddress string 479 480 // CIDR of the network, in 123.45.67.89/24 format. 481 CIDR string 482 483 // NetworkName is juju-internal name of the network. 484 // TODO(dimitern) This should be removed or adapted to the model 485 // once spaces are introduced. 486 NetworkName string 487 488 // ProviderId is a provider-specific network id. 489 ProviderId network.Id 490 491 // VLANTag needs to be between 1 and 4094 for VLANs and 0 for 492 // normal networks. It's defined by IEEE 802.1Q standard. 493 VLANTag int 494 495 // InterfaceName is the raw OS-specific network device name (e.g. 496 // "eth1", even for a VLAN eth1.42 virtual interface). 497 InterfaceName string 498 499 // Disabled is true when the interface needs to be disabled on the 500 // machine, e.g. not to configure it at all or stop it if running. 501 Disabled bool 502 503 // NoAutoStart is true when the interface should not be configured 504 // to start automatically on boot. By default and for 505 // backwards-compatibility, interfaces are configured to 506 // auto-start. 507 NoAutoStart bool `json:",omitempty"` 508 509 // ConfigType, if set, defines what type of configuration to use. 510 // See network.InterfaceConfigType for more info. If not set, for 511 // backwards-compatibility, "dhcp" is assumed. 512 ConfigType string `json:",omitempty"` 513 514 // Address contains an optional static IP address to configure for 515 // this network interface. The subnet mask to set will be inferred 516 // from the CIDR value. 517 Address string `json:",omitempty"` 518 519 // DNSServers contains an optional list of IP addresses and/or 520 // hostnames to configure as DNS servers for this network 521 // interface. 522 DNSServers []string `json:",omitempty"` 523 524 // Gateway address, if set, defines the default gateway to 525 // configure for this network interface. For containers this 526 // usually (one of) the host address(es). 527 GatewayAddress string `json:",omitempty"` 528 529 // ExtraConfig can contain any valid setting and its value allowed 530 // inside an "iface" section of a interfaces(5) config file, e.g. 531 // "up", "down", "mtu", etc. 532 ExtraConfig map[string]string `json:",omitempty"` 533 } 534 535 // MachineNetworkInfoResult holds network info for a single machine. 536 type MachineNetworkInfoResult struct { 537 Error *Error 538 Info []NetworkInfo `json:"Info"` 539 } 540 541 // MachineNetworkInfoResults holds network info for multiple machines. 542 type MachineNetworkInfoResults struct { 543 Results []MachineNetworkInfoResult 544 } 545 546 // EntityStatus holds an entity tag, status and extra info. 547 type EntityStatus struct { 548 Tag string 549 Status Status 550 Info string 551 Data map[string]interface{} 552 } 553 554 // SetStatus holds the parameters for making a SetStatus/UpdateStatus call. 555 type SetStatus struct { 556 Entities []EntityStatus 557 } 558 559 // StatusResult holds an entity status, extra information, or an 560 // error. 561 type StatusResult struct { 562 Error *Error 563 Id string 564 Life Life 565 Status Status 566 Info string 567 Data map[string]interface{} 568 } 569 570 // StatusResults holds multiple status results. 571 type StatusResults struct { 572 Results []StatusResult 573 } 574 575 // MachineAddresses holds an machine tag and addresses. 576 type MachineAddresses struct { 577 Tag string 578 // TODO(dimitern): Add explicit JSON serialization tags and use 579 // []string instead in order to break the dependency on the 580 // network package, as this potentially introduces hard to catch 581 // and debug wire-format changes in the protocol when the type 582 // changes! 583 Addresses []network.Address 584 } 585 586 // SetMachinesAddresses holds the parameters for making a SetMachineAddresses call. 587 type SetMachinesAddresses struct { 588 MachineAddresses []MachineAddresses 589 } 590 591 // ConstraintsResult holds machine constraints or an error. 592 type ConstraintsResult struct { 593 Error *Error 594 Constraints constraints.Value 595 } 596 597 // ConstraintsResults holds multiple constraints results. 598 type ConstraintsResults struct { 599 Results []ConstraintsResult 600 } 601 602 // AgentGetEntitiesResults holds the results of a 603 // agent.API.GetEntities call. 604 type AgentGetEntitiesResults struct { 605 Entities []AgentGetEntitiesResult 606 } 607 608 // AgentGetEntitiesResult holds the results of a 609 // machineagent.API.GetEntities call for a single entity. 610 type AgentGetEntitiesResult struct { 611 Life Life 612 Jobs []multiwatcher.MachineJob 613 ContainerType instance.ContainerType 614 Error *Error 615 } 616 617 // VersionResult holds the version and possibly error for a given 618 // DesiredVersion() API call. 619 type VersionResult struct { 620 Version *version.Number 621 Error *Error 622 } 623 624 // VersionResults is a list of versions for the requested entities. 625 type VersionResults struct { 626 Results []VersionResult 627 } 628 629 // ToolsResult holds the tools and possibly error for a given 630 // Tools() API call. 631 type ToolsResult struct { 632 Tools *tools.Tools 633 DisableSSLHostnameVerification bool 634 Error *Error 635 } 636 637 // ToolsResults is a list of tools for various requested agents. 638 type ToolsResults struct { 639 Results []ToolsResult 640 } 641 642 // Version holds a specific binary version. 643 type Version struct { 644 Version version.Binary 645 } 646 647 // EntityVersion specifies the tools version to be set for an entity 648 // with the given tag. 649 // version.Binary directly. 650 type EntityVersion struct { 651 Tag string 652 Tools *Version 653 } 654 655 // EntitiesVersion specifies what tools are being run for 656 // multiple entities. 657 type EntitiesVersion struct { 658 AgentTools []EntityVersion 659 } 660 661 // NotifyWatchResult holds a NotifyWatcher id and an error (if any). 662 type NotifyWatchResult struct { 663 NotifyWatcherId string 664 Error *Error 665 } 666 667 // NotifyWatchResults holds the results for any API call which ends up 668 // returning a list of NotifyWatchers 669 type NotifyWatchResults struct { 670 Results []NotifyWatchResult 671 } 672 673 // StringsWatchResult holds a StringsWatcher id, changes and an error 674 // (if any). 675 type StringsWatchResult struct { 676 StringsWatcherId string 677 Changes []string 678 Error *Error 679 } 680 681 // StringsWatchResults holds the results for any API call which ends up 682 // returning a list of StringsWatchers. 683 type StringsWatchResults struct { 684 Results []StringsWatchResult 685 } 686 687 // RelationUnitsWatchResult holds a RelationUnitsWatcher id, changes 688 // and an error (if any). 689 type RelationUnitsWatchResult struct { 690 RelationUnitsWatcherId string 691 Changes multiwatcher.RelationUnitsChange 692 Error *Error 693 } 694 695 // RelationUnitsWatchResults holds the results for any API call which ends up 696 // returning a list of RelationUnitsWatchers. 697 type RelationUnitsWatchResults struct { 698 Results []RelationUnitsWatchResult 699 } 700 701 // CharmsResponse is the server response to charm upload or GET requests. 702 type CharmsResponse struct { 703 Error string `json:",omitempty"` 704 CharmURL string `json:",omitempty"` 705 Files []string `json:",omitempty"` 706 } 707 708 // RunParams is used to provide the parameters to the Run method. 709 // Commands and Timeout are expected to have values, and one or more 710 // values should be in the Machines, Services, or Units slices. 711 type RunParams struct { 712 Commands string 713 Timeout time.Duration 714 Machines []string 715 Services []string 716 Units []string 717 } 718 719 // RunResult contains the result from an individual run call on a machine. 720 // UnitId is populated if the command was run inside the unit context. 721 type RunResult struct { 722 exec.ExecResponse 723 MachineId string 724 UnitId string 725 Error string 726 } 727 728 // RunResults is used to return the slice of results. API server side calls 729 // need to return single structure values. 730 type RunResults struct { 731 Results []RunResult 732 } 733 734 // AgentVersionResult is used to return the current version number of the 735 // agent running the API server. 736 type AgentVersionResult struct { 737 Version version.Number 738 } 739 740 // ProvisioningInfo holds machine provisioning info. 741 type ProvisioningInfo struct { 742 Constraints constraints.Value 743 Series string 744 Placement string 745 Networks []string 746 Jobs []multiwatcher.MachineJob 747 Volumes []storage.VolumeParams 748 } 749 750 // ProvisioningInfoResult holds machine provisioning info or an error. 751 type ProvisioningInfoResult struct { 752 Error *Error 753 Result *ProvisioningInfo 754 } 755 756 // ProvisioningInfoResults holds multiple machine provisioning info results. 757 type ProvisioningInfoResults struct { 758 Results []ProvisioningInfoResult 759 } 760 761 // Metric holds a single metric. 762 type Metric struct { 763 Key string 764 Value string 765 Time time.Time 766 } 767 768 // MetricsParam contains the metrics for a single unit. 769 type MetricsParam struct { 770 Tag string 771 Metrics []Metric 772 } 773 774 // MetricsParams contains the metrics for multiple units. 775 type MetricsParams struct { 776 Metrics []MetricsParam 777 } 778 779 // MeterStatusResult holds unit meter status or error. 780 type MeterStatusResult struct { 781 Code string 782 Info string 783 Error *Error 784 } 785 786 // MeterStatusResults holds meter status results for multiple units. 787 type MeterStatusResults struct { 788 Results []MeterStatusResult 789 } 790 791 // MachineBlockDevices holds a machine tag and the block devices present 792 // on that machine. 793 type MachineBlockDevices struct { 794 Machine string 795 BlockDevices []storage.BlockDevice 796 } 797 798 // SetMachineBlockDevices holds the arguments for recording the block 799 // devices present on a set of machines. 800 type SetMachineBlockDevices struct { 801 MachineBlockDevices []MachineBlockDevices 802 } 803 804 // BlockDeviceResult holds the result of an API call to retrieve details 805 // of a block device. 806 type BlockDeviceResult struct { 807 Result storage.BlockDevice `json:"result"` 808 Error *Error `json:"error,omitempty"` 809 } 810 811 // BlockDeviceResults holds the result of an API call to retrieve details 812 // of multiple block devices. 813 type BlockDeviceResults struct { 814 Results []BlockDeviceResult `json:"results,omitempty"` 815 } 816 817 // BlockDevicesResult holds the result of an API call to retrieve details 818 // of all block devices relating to some entity. 819 type BlockDevicesResult struct { 820 Result []storage.BlockDevice `json:"result"` 821 Error *Error `json:"error,omitempty"` 822 } 823 824 // BlockDevicseResults holds the result of an API call to retrieve details 825 // of all block devices relating to some entities. 826 type BlockDevicesResults struct { 827 Results []BlockDevicesResult `json:"results,omitempty"` 828 } 829 830 // BlockDeviceFilesystem holds the parameters for recording information about 831 // the specified block device's filesystem. 832 type BlockDeviceFilesystem struct { 833 DiskTag string `json:"disktag"` 834 StorageTag string `json:"storagetag"` 835 FilesystemType string `json:"fstype"` 836 } 837 838 // SetBlockDeviceFilesystem holds the parameters for recording information about 839 // the filesystems corresponding to the specified block devices. 840 type SetBlockDeviceFilesystem struct { 841 Filesystems []BlockDeviceFilesystem `json:"filesystems"` 842 } 843 844 // StorageInstanceResult holds the result of an API call to retrieve details 845 // of a storage instance. 846 type StorageInstanceResult struct { 847 Result storage.StorageInstance `json:"result"` 848 Error *Error `json:"error,omitempty"` 849 } 850 851 // StorageInstanceResult holds the result of an API call to retrieve details 852 // of multiple storage instances. 853 type StorageInstanceResults struct { 854 Results []StorageInstanceResult `json:"results,omitempty"` 855 } 856 857 // UnitStorageInstances holds the storage instances for a given unit. 858 type UnitStorageInstances struct { 859 Instances []storage.StorageInstance `json:"instances,omitempty"` 860 Error *Error `json:"error,omitempty"` 861 } 862 863 // UnitStorageInstancesResults holds the result of a StorageInstances call for a unit. 864 type UnitStorageInstancesResults struct { 865 UnitsStorageInstances []UnitStorageInstances `json:"unitstorageinstances,omitempty"` 866 }