예제 #1
0
        public static CloudBlockStorageProvider blockStorageProvider()
        {
            string CloudIdentityUserName = (string)(HttpContext.Current.Session["CloudIdentityUserName"]);
            string CloudIdentityApiKey   = (string)(HttpContext.Current.Session["CloudIdentityApiKey"]);

            RackspaceCloudIdentity identity = new RackspaceCloudIdentity()
            {
                Username = CloudIdentityUserName, APIKey = CloudIdentityApiKey
            };

            CloudBlockStorageProvider CloudBlockStorageProvider = new net.openstack.Providers.Rackspace.CloudBlockStorageProvider(identity);

            return(CloudBlockStorageProvider);
        }
예제 #2
0
        protected CloudBlockStorageProvider blockStorageProvider()
        {
            string CloudIdentityUserName = (string)(Session["CloudIdentityUserName"]);
            string CloudIdentityApiKey   = (string)(Session["CloudIdentityApiKey"]);

            RackspaceImpersonationIdentity identity = new RackspaceImpersonationIdentity()
            {
                Username = CloudIdentityUserName, APIKey = CloudIdentityApiKey
            };

            CloudBlockStorageProvider CloudBlockStorageProvider = new net.openstack.Providers.Rackspace.CloudBlockStorageProvider(identity);

            return(CloudBlockStorageProvider);
        }