本文整理汇总了Python中virtManager.baseclass.vmmGObjectUI.__init__函数的典型用法代码示例。如果您正苦于以下问题:Python __init__函数的具体用法?Python __init__怎么用?Python __init__使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了__init__函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, conn):
vmmGObjectUI.__init__(self, "createpool.ui", "vmm-create-pool")
self.conn = conn
self._pool = None
self.builder.connect_signals({
"on_pool_forward_clicked" : self.forward,
"on_pool_back_clicked" : self.back,
"on_pool_cancel_clicked" : self.close,
"on_vmm_create_pool_delete_event" : self.close,
"on_pool_finish_clicked" : self.forward,
"on_pool_pages_change_page" : self.page_changed,
"on_pool_source_button_clicked" : self.browse_source_path,
"on_pool_target_button_clicked" : self.browse_target_path,
"on_pool_name_activate": self.forward,
"on_pool_hostname_activate" : self.hostname_changed,
"on_pool_iqn_chk_toggled": self.iqn_toggled,
})
self.bind_escape_key_close()
self.set_initial_state()
self.set_page(PAGE_NAME)
示例2: reset_state
def reset_state(self):
#initialize all UI components to none
self.vmaDeleteHostAffinityBanner = None
self.allVMsScrolledwindow = None
self.selectedVMAffinedHostsScrolledwindow = None
self.selectedRuleDesTextview = None
self.cancelRuleDeletionButton = None
self.DeleteHostAffinityButton = None
self.errorLabel = None
self.allVmsClist = None
self.affinedHostsClist = None
#CList related variables
self.selectedVMRow = None
self.selectedVMColumn = None
self.allVMHostAffinityDictionary = None
vmmGObjectUI.__init__(self, "vmaffinity-deleterule.ui", "vmaffinity-deleterule")
#Connect signals
self.window.connect_signals({
"on_cancelRuleDeletionButton_clicked": self.close,
"on_DeleteHostAffinityButton_clicked":self.DeleteHostAffinityRuleButtonClicked,
"on_vmaffinity-deletehostaffinityrule_delete_event": self.close,})
#Initialize all UI components
self.initUIComponents()
self.err = vmmErrorDialog()
开发者ID:sandeep-krishnamurthy,项目名称:vm_affinity_management_tool_for_kvm,代码行数:32,代码来源:vmaffinitydeletehostaffinityrule.py
示例3: __init__
def __init__(self, conn, parent_pool):
vmmGObjectUI.__init__(self, "vmm-create-vol.ui", "vmm-create-vol")
self.conn = conn
self.parent_pool = parent_pool
self.name_hint = None
self.vol = None
self.vol_class = Storage.StoragePool.get_volume_for_pool(parent_pool.get_type())
self.builder.connect_signals({
"on_vmm_create_vol_delete_event" : self.close,
"on_vol_cancel_clicked" : self.close,
"on_vol_create_clicked" : self.finish,
"on_vol_name_changed" : self.vol_name_changed,
"on_vol_allocation_value_changed" : self.vol_allocation_changed,
"on_vol_capacity_value_changed" : self.vol_capacity_changed,
})
self.bind_escape_key_close()
format_list = self.widget("vol-format")
format_model = Gtk.ListStore(str, str)
format_list.set_model(format_model)
text2 = Gtk.CellRendererText()
format_list.pack_start(text2, False)
format_list.add_attribute(text2, 'text', 1)
self.widget("vol-info-view").modify_bg(Gtk.StateType.NORMAL,
Gdk.Color.parse("grey")[1])
finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
Gtk.IconSize.BUTTON)
self.widget("vol-create").set_image(finish_img)
self.reset_state()
示例4: __init__
def __init__(self, vm, disk):
vmmGObjectUI.__init__(self, "choosecd.ui", "vmm-choose-cd")
self.vm = vm
self.conn = self.vm.conn
self.storage_browser = None
# This is also overwritten from details.py when targetting a new disk
self.disk = disk
self.media_type = disk.device
self.mediacombo = vmmMediaCombo(self.conn, self.builder, self.topwin,
self.media_type)
self.widget("media-combo-align").add(self.mediacombo.top_box)
self.builder.connect_signals({
"on_vmm_choose_cd_delete_event": self.close,
"on_media_toggled": self.media_toggled,
"on_fv_iso_location_browse_clicked": self.browse_fv_iso_location,
"on_ok_clicked": self.ok,
"on_cancel_clicked": self.close,
})
self.reset_state()
示例5: __init__
def __init__(self, vm, builder, topwin):
vmmGObjectUI.__init__(self, "fsdetails.ui",
None, builder=builder, topwin=topwin)
self.vm = vm
self.conn = vm.conn
self._dev = None
self.storage_browser = None
self.builder.connect_signals({
"on_fs_type_combo_changed": self.change_field,
"on_fs_driver_combo_changed": self.change_field,
"on_fs_source_browse_clicked": self.browse_fs_source,
"on_fs_mode_combo_changed": self.notify_change,
"on_fs_wrpolicy_combo_changed": self.notify_change,
"on_fs_readonly_toggled": self.notify_change,
"on_fs_format_combo_changed": self.notify_change,
"on_fs_source_changed": self.notify_change,
"on_fs_ram_source_changed": self.notify_change,
"on_fs_target_changed": self.notify_change,
})
self.set_initial_state()
self.top_box = self.widget("vmm-fs-details")
示例6: __init__
def __init__(self, vm, builder, topwin):
vmmGObjectUI.__init__(self, "vmm-snapshots.ui",
None, builder=builder, topwin=topwin)
self.vm = vm
self._initial_populate = False
self._init_ui()
self._snapshot_new = self.widget("snapshot-new")
self._snapshot_new.set_transient_for(self.topwin)
self.builder.connect_signals({
"on_snapshot_add_clicked": self._on_add_clicked,
"on_snapshot_delete_clicked": self._on_delete_clicked,
"on_snapshot_start_clicked": self._on_start_clicked,
"on_snapshot_apply_clicked": self._on_apply_clicked,
# 'Create' dialog
"on_snapshot_new_delete_event": self._snapshot_new_close,
"on_snapshot_new_ok_clicked": self._on_new_ok_clicked,
"on_snapshot_new_cancel_clicked" : self._snapshot_new_close,
})
self.top_box = self.widget("snapshot-top-box")
self.widget("snapshot-top-window").remove(self.top_box)
self.widget("snapshot-list").get_selection().connect("changed",
self._snapshot_selected)
self._set_snapshot_state(None)
示例7: __init__
def __init__(self, conn, parent_pool):
vmmGObjectUI.__init__(self, "vmm-create-vol.ui", "vmm-create-vol")
self.conn = conn
self.parent_pool = parent_pool
self.name_hint = None
self.vol = None
self.vol_class = Storage.StoragePool.get_volume_for_pool(parent_pool.get_type())
self.window.connect_signals({
"on_vmm_create_vol_delete_event" : self.close,
"on_vol_cancel_clicked" : self.close,
"on_vol_create_clicked" : self.finish,
"on_vol_name_changed" : self.vol_name_changed,
"on_vol_allocation_value_changed" : self.vol_allocation_changed,
"on_vol_capacity_value_changed" : self.vol_capacity_changed,
})
self.bind_escape_key_close()
format_list = self.widget("vol-format")
format_model = gtk.ListStore(str, str)
format_list.set_model(format_model)
text2 = gtk.CellRendererText()
format_list.pack_start(text2, False)
format_list.add_attribute(text2, 'text', 1)
self.widget("vol-info-view").modify_bg(gtk.STATE_NORMAL,
gtk.gdk.color_parse("grey"))
# XXX: Help docs useless/out of date
self.widget("pool-help").hide()
finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
gtk.ICON_SIZE_BUTTON)
self.widget("vol-create").set_image(finish_img)
self.reset_state()
示例8: __init__
def __init__(self):
vmmGObjectUI.__init__(self, "about.ui", "vmm-about")
self.builder.connect_signals({
"on_vmm_about_delete_event": self.close,
"on_vmm_about_response": self.close,
})
示例9: reset_state
def reset_state(self):
# check if groups config file exists
vmaffinityxmlutil.checkIfGroupsConfigExists()
#initialize all UI components to none
self.viewHostAffinityRulesImageBanner = None
self.availableVirtualMachinesScrolledwindow = None
self.selectedVMDesTextview = None
self.selectedVMAffinedHostsScrolledwindow = None
self.cancelViewHostAffinityRuleButton = None
self.okViewHostAffinityRuleButton = None
self.allVMsClist = None
self.affinedHostsClist = None
#CList related variables
self.selectedVMRow = None
self.selectedVMColumn = None
self.allVMHostAffinityDictionary = None
#Initialize window
vmmGObjectUI.__init__(self, "vmaffinity-view-hostaffinityrules.ui", "vmaffinity-view-hostaffinity-rules")
#Connect signals
self.window.connect_signals({
"on_vmaffinity-view-configured-rules_delete_event":self.close,
"on_cancelViewHostAffinityRuleButton_clicked":self.close,
"on_okViewHostAffinityRuleButton_clicked":self.close,
})
#Initialize UI components
self.initUIComponents()
开发者ID:sandeep-krishnamurthy,项目名称:vm_affinity_management_tool_for_kvm,代码行数:34,代码来源:vmaffinityviewhostaffinityrules.py
示例10: __init__
def __init__(self, conn, parent_pool):
vmmGObjectUI.__init__(self, "createvol.ui", "vmm-create-vol")
self.conn = conn
self.parent_pool = parent_pool
self.name_hint = None
self.vol = None
self.storage_browser = None
self.builder.connect_signals({
"on_vmm_create_vol_delete_event" : self.close,
"on_vol_cancel_clicked" : self.close,
"on_vol_create_clicked" : self.finish,
"on_vol_name_changed" : self.vol_name_changed,
"on_vol_format_changed" : self.vol_format_changed,
"on_backing_store_changed" : self._show_alloc,
"on_vol_allocation_value_changed" : self.vol_allocation_changed,
"on_vol_capacity_value_changed" : self.vol_capacity_changed,
"on_backing_browse_clicked" : self.browse_backing,
})
self.bind_escape_key_close()
self._init_state()
self.reset_state()
示例11: __init__
def __init__(self):
# check if groups config file exists
vmaffinityxmlutil.checkIfGroupsConfigExists()
#initialize all UI components to none
self.viewRulesImageBanner = None
self.configuredAffinityRulesScrolledwindow = None
self.selectedRuleDesTextview = None
self.selectedAffinityRuleVMsScrolledwindow = None
self.cancelViewRuleButton = None
self.okViewRuleButton = None
self.allGroupsClist = None
self.VMsInGroupClist = None
#CList related variables
self.selectedGroupRow = None
self.selectedGroupColumn = None
self.allGroupDictionary = None
#Initialize window
vmmGObjectUI.__init__(self, "vmaffinity-view-rules.ui", "vmaffinity-view-rules")
#Connect signals
self.window.connect_signals({
"on_vmaffinity-view-configured-rules_delete_event":self.close,
"on_cancelViewRuleButton_clicked":self.close,
"on_okViewRuleButton_clicked":self.close,
})
#Initialize UI components
self.initUIComponents()
开发者ID:sandeep-krishnamurthy,项目名称:vm_affinity_management_tool_for_kvm,代码行数:34,代码来源:vmaffinityviewrules.py
示例12: __init__
def __init__(self, vm, builder, topwin):
vmmGObjectUI.__init__(self, "snapshots.ui",
None, builder=builder, topwin=topwin)
self.vm = vm
self._initial_populate = False
self._snapmenu = None
self._init_ui()
self._snapshot_new = self.widget("snapshot-new")
self._snapshot_new.set_transient_for(self.topwin)
self.bind_escape_key_close_helper(self._snapshot_new,
self._snapshot_new_close)
self.builder.connect_signals({
"on_snapshot_add_clicked": self._on_add_clicked,
"on_snapshot_delete_clicked": self._on_delete_clicked,
"on_snapshot_start_clicked": self._on_start_clicked,
"on_snapshot_apply_clicked": self._on_apply_clicked,
"on_snapshot_list_changed": self._snapshot_selected,
"on_snapshot_list_button_press_event": self._popup_snapshot_menu,
# 'Create' dialog
"on_snapshot_new_delete_event": self._snapshot_new_close,
"on_snapshot_new_ok_clicked": self._on_new_ok_clicked,
"on_snapshot_new_cancel_clicked" : self._snapshot_new_close,
"on_snapshot_new_name_changed" : self._snapshot_new_name_changed,
"on_snapshot_new_name_activate": self._on_new_ok_clicked,
})
self.top_box = self.widget("snapshot-top-box")
self.widget("snapshot-top-window").remove(self.top_box)
self.widget("snapshot-list").get_selection().emit("changed")
示例13: __init__
def __init__(self, conn):
vmmGObjectUI.__init__(self, "vmm-create-net.ui", "vmm-create-net")
self.conn = conn
self.window.connect_signals({
"on_create_pages_switch_page" : self.page_changed,
"on_create_cancel_clicked" : self.close,
"on_vmm_create_delete_event" : self.close,
"on_create_forward_clicked" : self.forward,
"on_create_back_clicked" : self.back,
"on_create_finish_clicked" : self.finish,
"on_net_name_activate": self.forward,
"on_net_forward_toggled" : self.change_forward_type,
"on_net_network_changed": self.change_network,
"on_net_dhcp_enable_toggled": self.change_dhcp_enable,
"on_net_dhcp_start_changed": self.change_dhcp_start,
"on_net_dhcp_end_changed": self.change_dhcp_end,
"on_create_help_clicked": self.show_help,
})
self.bind_escape_key_close()
# XXX: Help docs useless/out of date
self.widget("create-help").hide()
finish_img = gtk.image_new_from_stock(gtk.STOCK_QUIT,
gtk.ICON_SIZE_BUTTON)
self.widget("create-finish").set_image(finish_img)
self.set_initial_state()
示例14: __init__
def __init__(self, conn):
vmmGObjectUI.__init__(self, "vmm-create-net.ui", "vmm-create-net")
self.conn = conn
self.builder.connect_signals({
"on_create_pages_switch_page" : self.page_changed,
"on_create_cancel_clicked" : self.close,
"on_vmm_create_delete_event" : self.close,
"on_create_forward_clicked" : self.forward,
"on_create_back_clicked" : self.back,
"on_create_finish_clicked" : self.finish,
"on_net_name_activate": self.forward,
"on_net_forward_toggled" : self.change_forward_type,
"on_net-ipv4-enable_toggled" : self.change_ipv4_enable,
"on_net-ipv4-network_changed": self.change_network,
"on_net-dhcpv4-enable_toggled": self.change_dhcpv4_enable,
"on_net-dhcpv4-start_changed": self.change_dhcpv4_start,
"on_net-dhcpv4-end_changed": self.change_dhcpv4_end,
"on_net-ipv6-enable_toggled" : self.change_ipv6_enable,
"on_net-ipv6-network_changed": self.change_ipv6_network,
"on_net-dhcpv6-enable_toggled": self.change_dhcpv6_enable,
"on_net-dhcpv6-start_changed": self.change_dhcpv6_start,
"on_net-dhcpv6-end_changed": self.change_dhcpv6_end,
})
self.bind_escape_key_close()
finish_img = Gtk.Image.new_from_stock(Gtk.STOCK_QUIT,
Gtk.IconSize.BUTTON)
self.widget("create-finish").set_image(finish_img)
self.set_initial_state()
示例15: __init__
def __init__(self, vm, engine):
vmmGObjectUI.__init__(self, "vmm-migrate.ui", "vmm-migrate")
self.vm = vm
self.conn = vm.conn
self.engine = engine
self.destconn_rows = []
self.window.connect_signals({
"on_vmm_migrate_delete_event" : self.close,
"on_migrate_cancel_clicked" : self.close,
"on_migrate_finish_clicked" : self.finish,
"on_migrate_dest_changed" : self.destconn_changed,
"on_migrate_set_rate_toggled" : self.toggle_set_rate,
"on_migrate_set_interface_toggled" : self.toggle_set_interface,
"on_migrate_set_port_toggled" : self.toggle_set_port,
"on_migrate_set_maxdowntime_toggled" : self.toggle_set_maxdowntime,
})
self.bind_escape_key_close()
blue = gtk.gdk.color_parse("#0072A8")
self.widget("migrate-header").modify_bg(gtk.STATE_NORMAL,
blue)
image = gtk.image_new_from_icon_name("vm_clone_wizard",
gtk.ICON_SIZE_DIALOG)
image.show()
self.widget("migrate-vm-icon-box").pack_end(image, False)
self.init_state()