openstack学习笔记一 虚拟机启动过程代码跟踪 本文主要通过对虚拟机创建过程的代码跟踪.观察虚拟机启动任务状态的变化,来透彻理解openstack各组件之间的作用过程. 当从horizon界面发送一个创建虚拟机请求,horizon api 将会依据前端给定的数据信息.调用novaclient 生成一个创建虚拟机的http post 请求来创建vm服务. >/usr/lib/python2.6/site-packages/horizon/api/nova.py(334)server_crea…
<Java编程思想>学习笔记(二)--类加载及执行顺序 (这是很久之前写的,保存在印象笔记上,今天写在博客上.) 今天看Java编程思想,看到这样一道代码 //: OrderOfInitialization.java // Demonstrates initialization order. // When the constructor is called, to create a // Tag object, you'll see a message: class Tag { Tag(in…
1.For循环 //1.条件递增 for var index = 0; index < 3; ++index { println("index is \(index)") } //2.for in循环 // 2.1有变量名 for index in 1...5 { println("\(index) times 5 is \(index * 5)") } // 2.2没有变量名,如果不需要知道区间内每一项的值,你可以使用下划线(_)替代变量名来忽略对值的访问:…
1.Constants and Variables(常量和变量) let定义常量,var定义变量. [Note] If a stored value in your code won't change, always declare it as a constant with the let keyword. Use variables only for storing values that need to be able to change. 如果代码中的存储值不会更改,则始终使用let关键…