コード例 #1
0
			transaction, err := virtualGuestService.DetachDiskImage(virtualGuest.Id, imageId)

			Expect(err).ToNot(HaveOccurred())
			Expect(transaction).ToNot(Equal(datatypes.SoftLayer_Provisioning_Version1_Transaction{}))
		})
	})

	Context("#ActivatePrivatePort", func() {
		BeforeEach(func() {
			virtualGuest.Id = 1234567
			fakeClient.DoRawHttpRequestResponse, err = testhelpers.ReadJsonTestFixtures("services", "SoftLayer_Virtual_Guest_Service_activatePrivatePort.json")
			Expect(err).ToNot(HaveOccurred())
		})

		It("activates private port for virtual guest instance", func() {
			activated, err := virtualGuestService.ActivatePrivatePort(virtualGuest.Id)

			Expect(err).ToNot(HaveOccurred())
			Expect(activated).To(BeTrue())
		})
	})

	Context("#ActivatePublicPort", func() {
		BeforeEach(func() {
			virtualGuest.Id = 1234567
			fakeClient.DoRawHttpRequestResponse, err = testhelpers.ReadJsonTestFixtures("services", "SoftLayer_Virtual_Guest_Service_activatePublicPort.json")
			Expect(err).ToNot(HaveOccurred())
		})

		It("activates public port for virtual guest instance", func() {
			activated, err := virtualGuestService.ActivatePublicPort(virtualGuest.Id)