added vm_template parameter to djangohosting view
This commit is contained in:
		
					parent
					
						
							
								085133fb53
							
						
					
				
			
			
				commit
				
					
						3e755b3b68
					
				
			
		
					 2 changed files with 8 additions and 7 deletions
				
			
		|  | @ -24,6 +24,7 @@ | ||||||
|                 {% csrf_token %} |                 {% csrf_token %} | ||||||
|                 <input type="hidden" name="hosting_company" value="{{vm.hosting_company}}"> |                 <input type="hidden" name="hosting_company" value="{{vm.hosting_company}}"> | ||||||
|                 <input type="hidden" name="location_code" value="{{vm.location_code}}"> |                 <input type="hidden" name="location_code" value="{{vm.location_code}}"> | ||||||
|  |                 <input type="hidden" name="vm_template" value="1"> | ||||||
|                 |                 | ||||||
|                  |                  | ||||||
|                  |                  | ||||||
|  |  | ||||||
|  | @ -310,17 +310,17 @@ class PaymentVMView(LoginRequiredMixin, FormView): | ||||||
|             order.set_approved() |             order.set_approved() | ||||||
| 
 | 
 | ||||||
|             # Create VM using oppenebula functions  |             # Create VM using oppenebula functions  | ||||||
|             _request = namedtuple('request', 'POST user') |             # _request = namedtuple('request', 'POST user') | ||||||
|             _request.user = request.user |             # _request.user = request.user | ||||||
|             # user = namedtuple('user', 'email') |             # user = namedtuple('user', 'email') | ||||||
|             # email  |             # email  | ||||||
|             _request.POST = { |             # _request.POST = { | ||||||
|                 'vm_template': vm_template |                 # 'vm_template': vm_template | ||||||
|             } |             # } | ||||||
| 
 | 
 | ||||||
|             hosting_admin = HostingManageVMAdmin.__new__(HostingManageVMAdmin) |             hosting_admin = HostingManageVMAdmin.__new__(HostingManageVMAdmin) | ||||||
|             hosting_admin.init_opennebula_client(_request) |             hosting_admin.init_opennebula_client(request) | ||||||
|             hosting_admin.create(_request) |             hosting_admin.create(request) | ||||||
| 
 | 
 | ||||||
|             # Send notification to ungleich as soon as VM has been booked |             # Send notification to ungleich as soon as VM has been booked | ||||||
|             context = { |             context = { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue