vRO Extend VirtualDisk Workflow
https://vbombarded.wordpress.com/2015/02/20/vrealize-orchestrator-extend-virtual-disk-workflow/
var devices = vm.config.hardware.device;
System.log(devices) for (i in devices){
if (devices[i].deviceInfo.label == diskString){
var disk = devices[i]
System.log("Disk = " + disk.deviceInfo.label)
}
} var newSizeKB = disk.capacityInKB + (increaseSizeGB * 1024 * 1024)
System.log("New Size KB = " + newSizeKB) var spec = new VcVirtualMachineConfigSpec();
spec.changeVersion = vm.config.changeVersion;
spec.deviceChange = System.getModule("com.vmware.onyx").array(VcVirtualDeviceConfigSpec, 1);
spec.deviceChange[0] = new VcVirtualDeviceConfigSpec();
spec.deviceChange[0].operation = VcVirtualDeviceConfigSpecOperation.edit;
spec.deviceChange[0].device = new VcVirtualDisk();
spec.deviceChange[0].device.key = disk.key;
spec.deviceChange[0].device.deviceInfo = new VcDescription();
spec.deviceChange[0].device.deviceInfo.label = disk.deviceInfo.label;
spec.deviceChange[0].device.deviceInfo.summary = disk.deviceInfo.summary;
spec.deviceChange[0].device.backing = new VcVirtualDiskFlatVer2BackingInfo();
spec.deviceChange[0].device.backing.fileName = disk.backing.fileName;
spec.deviceChange[0].device.backing.diskMode = disk.backing.diskMode;
spec.deviceChange[0].device.backing.split = disk.backing.split;
spec.deviceChange[0].device.backing.writeThrough = disk.backing.writeThrough;
spec.deviceChange[0].device.backing.thinProvisioned = disk.backing.thinProvisioned;
spec.deviceChange[0].device.backing.uuid = disk.backing.uuid;
spec.deviceChange[0].device.backing.contentId = disk.backing.contentId;
spec.deviceChange[0].device.backing.digestEnabled = disk.backing.digestEnabled;
spec.deviceChange[0].device.controllerKey = disk.controllerKey;
spec.deviceChange[0].device.unitNumber = disk.unitNumber;
spec.deviceChange[0].device.capacityInKB = newSizeKB;
spec.deviceChange[0].device.shares = new VcSharesInfo();
spec.deviceChange[0].device.shares.shares = disk.shares.shares;
spec.deviceChange[0].device.shares.level = disk.shares.level;
spec.deviceChange[0].device.storageIOAllocation = new VcStorageIOAllocationInfo();
spec.deviceChange[0].device.storageIOAllocation.limit = disk.storageIOAllocation.limit;
spec.deviceChange[0].device.storageIOAllocation.shares = new VcSharesInfo();
spec.deviceChange[0].device.storageIOAllocation.shares.shares = disk.storageIOAllocation.shares.shares;
spec.deviceChange[0].device.storageIOAllocation.shares.level = disk.storageIOAllocation.shares.level; return vm.reconfigVM_Task(spec);
vRO Extend VirtualDisk Workflow的更多相关文章
- 创建一个dynamics CRM workflow (一) - Introduction to Custom Workflows
Workflow: Use this process to model and automate real world business processes. These processes can ...
- [转]Reducing script compile time or a better workflow to reduce excessive recompiling
http://forum.unity3d.com/threads/148078-Reducing-script-compile-time-or-a-better-workflow-to-reduce- ...
- $.extend()的实现源码 --(源码学习1)
目标: $.extend({ add:function(a,b){ return a + b; } }) console.log($.a ...
- Mac 词典工具推荐:Youdao Alfred Workflow(可同步单词本)
想必大家都有用过 Mac 下常见的几款词典工具: 特性 系统 Dictionary 欧路词典 Mac 版 有道词典 Mac 版 在线搜索 ✗ ✔ ✔ 屏幕取词 ☆☆☆ ★★☆ ★☆☆ 划词搜索 ★★★ ...
- 图片放大功能插件及jquery.extend函数理解
前端时间,产品提出社区评论中的图片需要有放大功能.感觉可以共用,所以就想整合一个插件,过程中也借鉴了一些例子. 分析下自己的代码思路: var scaleImg = function(opts) { ...
- $.extend({},defaults, options) --(初体验三)
1.$.extend({},defaults, options) 这样做的目的是为了保护包默认参数.也就是defaults里面的参数. 做法是将一个新的空对象({})做为$.extend的第一个参数, ...
- jquery.fn.extend与jquery.extend--(初体验二)
1.jquery.extend(object); 为扩展jQuery类本身.为类添加新的方法. jquery.fn.extend(object);给jQuery对象添加方法. $.extend({ a ...
- SharePoint 2013 create workflow by SharePoint Designer 2013
这篇文章主要基于上一篇http://www.cnblogs.com/qindy/p/6242714.html的基础上,create a sample workflow by SharePoint De ...
- Install and Configure SharePoint 2013 Workflow
这篇文章主要briefly introduce the Install and configure SharePoint 2013 Workflow. Microsoft 推出了新的Workflow ...
随机推荐
- MM/PP/SD/FICO 模块常用事物码(T-code)、SAP快捷键
MM/PP/SD/FICO MM常用T-CODE MM01 创建一般物料 Create Material – GeneralMM02 修改一般物料 Change MaterialMM03 显示一般物料 ...
- python3 - 使用__slots__限制实例属性
为了限制实例的属性,可以在定义class的时候,定义一个特殊的__slots__变量,来限制class实例能添加的属性.比如,只允许对Persion实例添加name 和 age 属性 class Pe ...
- redis 集群出现的错误
1 解决方法: 不用 Jedis jed =new jedis("192.168.56.101"); jed.set(key,value); 用 Set<HostAndPor ...
- python time与datetime.date/datetime模块
https://docs.python.org/3/library/datetime.html 1.用于日期比较大小的方法 方法名 方法说明 用法 __eq__(…) 等于(x==y) x.__eq_ ...
- JS探秘——那些你理解存在偏差的问题
Javascript的连续赋值运算 var a = {n:1}; a.x = a = {n:2}; alert(a.x); // --> undefined 看 jQuery 源码 时发现的这种 ...
- CodeIgniter框架——源码分析之入口文件index.php
CodeIgniter框架的入口文件主要是配置开发环境,定义目录常量,加载CI的核心类core/CodeIgniter.php. 在index.php中,CI首先做的事情就是设置PHP的错误报告, ...
- JavaScript严格模式为何要禁用With语句
看了很多遍JavaScript严格模式,其中有说“禁用With语句”,以前看到这都是骑马观花,一带而过,因为平时就很少用到这个语句,禁不禁用对自己关系都不是很大.今天禁不住想知道为何“严格模式”就容不 ...
- Kotlin——中级篇(五):枚举类(Enum)、接口类(Interface)详解
在上一章节中,详细的类(class)做了一个实例讲解,提到了类(class)的实例化.构造函数.声明.实现方式.和Java中类的区别等.但是对于Kotlin中的类的使用还远远不止那些.并且在上文中提到 ...
- CF 617E【莫队求区间异或和】
E. XOR and Favorite Number time limit per test 4 seconds memory limit per test 256 megabytes input s ...
- 巨蟒python全栈开发linux之centos6 第二篇
1. .nginx负载均衡的实现 .准备三台机器,准备3台虚拟机,或者和俩同桌交流一下 192.168.226.128 是nginx资源服务器,返回页面的 192.168.226.129 用作ngin ...