class Fog::OpenStack::SharedFileSystem::Mock

rubocop:disable Metrics/LineLength, Metrics/MethodLength, Metrics/ClassLength, Metrics/AbcSize

Public Class Methods

data() click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 86
def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {
      :shares                   => [
        {
          "id"    => "d94a8548-2079-4be0-b21c-0a887acd31ca",
          "links" => [
            {
              "href" => "http://172.18.198.54:8786/v1/16e1ab15c35a457e9c2b2aa189f544e1/shares/d94a8548-2079-4be0-b21c-0a887acd31ca",
              "rel"  => "self"
            },
            {
              "href" => "http://172.18.198.54:8786/16e1ab15c35a457e9c2b2aa189f544e1/shares/d94a8548-2079-4be0-b21c-0a887acd31ca",
              "rel"  => "bookmark"
            }
          ],
          "name"  => "My_share"
        },
        {
          "id"    => "406ea93b-32e9-4907-a117-148b3945749f",
          "links" => [
            {
              "href" => "http://172.18.198.54:8786/v1/16e1ab15c35a457e9c2b2aa189f544e1/shares/406ea93b-32e9-4907-a117-148b3945749f",
              "rel"  => "self"
            },
            {
              "href" => "http://172.18.198.54:8786/16e1ab15c35a457e9c2b2aa189f544e1/shares/406ea93b-32e9-4907-a117-148b3945749f",
              "rel"  => "bookmark"
            }
          ],
          "name"  => "Share1"
        }
      ],
      :shares_detail            => [
        {
          "links"                       => [
            {
              "href" => "http://172.18.198.54:8786/v2/16e1ab15c35a457e9c2b2aa189f544e1/shares/f45cc5b2-d1bb-4a3e-ba5b-5c4125613adc",
              "rel"  => "self"
            },
            {
              "href" => "http://172.18.198.54:8786/16e1ab15c35a457e9c2b2aa189f544e1/shares/f45cc5b2-d1bb-4a3e-ba5b-5c4125613adc",
              "rel"  => "bookmark"
            }
          ],
          "availability_zone"           => "nova",
          "share_network_id"            => "f9b2e754-ac01-4466-86e1-5c569424754e",
          "export_locations"            => [],
          "share_server_id"             => "87d8943a-f5da-47a4-b2f2-ddfa6794aa82",
          "snapshot_id"                 => '',
          "id"                          => "f45cc5b2-d1bb-4a3e-ba5b-5c4125613adc",
          "size"                        => 1,
          "share_type"                  => "25747776-08e5-494f-ab40-a64b9d20d8f7",
          "share_type_name"             => "default",
          "export_location"             => '',
          "consistency_group_id"        => "9397c191-8427-4661-a2e8-b23820dc01d4",
          "project_id"                  => "16e1ab15c35a457e9c2b2aa189f544e1",
          "metadata"                    => {},
          "status"                      => "available",
          "access_rules_status"         => "active",
          "description"                 => "There is a share description.",
          "host"                        => "manila2@generic1#GENERIC1",
          "task_state"                  => '',
          "is_public"                   => 'true',
          "snapshot_support"            => 'true',
          "name"                        => "my_share4",
          "has_replicas"                => 'false',
          "replication_type"            => '',
          "created_at"                  => "2015-09-16T18:19:50.000000",
          "share_proto"                 => "NFS",
          "volume_type"                 => "default",
          "source_cgsnapshot_member_id" => ''
        }
      ],
      :share_networks           => [
        {
          "id"   => "32763294-e3d4-456a-998d-60047677c2fb",
          "name" => "net_my1"
        },
        {
          "id"   => "713df749-aac0-4a54-af52-10f6c991e80c",
          "name" => "net_my"
        }
      ],
      :share_networks_detail    => [
        {
          "name"              => "net_my1",
          "segmentation_id"   => '',
          "created_at"        => "2015-09-04T14:57:13.000000",
          "neutron_subnet_id" => "53482b62-2c84-4a53-b6ab-30d9d9800d06",
          "updated_at"        => '',
          "id"                => "32763294-e3d4-456a-998d-60047677c2fb",
          "neutron_net_id"    => "998b42ee-2cee-4d36-8b95-67b5ca1f2109",
          "ip_version"        => '',
          "nova_net_id"       => '',
          "cidr"              => '',
          "project_id"        => "16e1ab15c35a457e9c2b2aa189f544e1",
          "network_type"      => '',
          "description"       => "descr"
        }
      ],
      :snapshots                => [
        {
          "id"    => "086a1aa6-c425-4ecd-9612-391a3b1b9375",
          "links" => [
            {
              "href" => "http://172.18.198.54:8786/v1/16e1ab15c35a457e9c2b2aa189f544e1/snapshots/086a1aa6-c425-4ecd-9612-391a3b1b9375",
              "rel"  => "self"
            },
            {
              "href" => "http://172.18.198.54:8786/16e1ab15c35a457e9c2b2aa189f544e1/snapshots/086a1aa6-c425-4ecd-9612-391a3b1b9375",
              "rel"  => "bookmark"
            }
          ],
          "name"  => "snapshot_My_share"
        }
      ],
      :security_services_detail => [
        {
          "status"      => "new",
          "domain"      => "",
          "project_id"  => "16e1ab15c35a457e9c2b2aa189f544e1",
          "name"        => "SecServ1",
          "created_at"  => "2015-09-07T12:19:10.000000",
          "updated_at"  => "",
          "server"      => "",
          "dns_ip"      => "10.0.0.0/24",
          "user"        => "demo",
          "password"    => "supersecret",
          "type"        => "kerberos",
          "id"          => "3c829734-0679-4c17-9637-801da48c0d5f",
          "description" => "Creating my first Security Service"
        }
      ],
      :security_services        => [
        {
          "status" => "new",
          "type"   => "ldap",
          "id"     => "5a1d3a12-34a7-4087-8983-50e9ed03509a",
          "name"   => "SecServ2"
        }
      ],
      :availability_zones => [
          {
              "name"        => "nova",
              "created_at"  => "2015-09-18T09:50:55.000000",
              "updated_at"  => nil,
              "id"          => "388c983d-258e-4a0e-b1ba-10da37d766db"
          }
      ],
      :snapshots_detail      => [
        {
          "status"      => "available",
          "share_id"    => "d94a8548-2079-4be0-b21c-0a887acd31ca",
          "name"        => "snapshot_My_share",
          "links"       => [
            {
              "href" => "http://172.18.198.54:8786/v1/16e1ab15c35a457e9c2b2aa189f544e1/snapshots/086a1aa6-c425-4ecd-9612-391a3b1b9375",
              "rel"  => "self"
            },
            {
              "href" => "http://172.18.198.54:8786/16e1ab15c35a457e9c2b2aa189f544e1/snapshots/086a1aa6-c425-4ecd-9612-391a3b1b9375",
              "rel"  => "bookmark"
            }
          ],
          "created_at"  => "2015-09-07T11:55:09.000000",
          "description" => "Here is a snapshot of share My_share",
          "share_proto" => "NFS",
          "share_size"  => 1,
          "id"          => "086a1aa6-c425-4ecd-9612-391a3b1b9375",
          "size"        => 1
        }
      ],
      :export_locations         => [
        {
          "path"              => "10.254.0.3:/shares/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d",
          "share_instance_id" => "e1c2d35e-fe67-4028-ad7a-45f668732b1d",
          "is_admin_only"     => false,
          "id"                => "b6bd76ce-12a2-42a9-a30a-8a43b503867d",
          "preferred"         => false
        },
        {
          "path"              => "10.0.0.3:/shares/share-e1c2d35e-fe67-4028-ad7a-45f668732b1d",
          "share_instance_id" => "e1c2d35e-fe67-4028-ad7a-45f668732b1d",
          "is_admin_only"     => true,
          "id"                => "6921e862-88bc-49a5-a2df-efeed9acd583",
          "preferred"         => false
        }
      ],
      :access_rules             => [
        {
          "share_id"     => "406ea93b-32e9-4907-a117-148b3945749f",
          "created_at"   => "2015-09-07T09:14:48.000000",
          "updated_at"   => '',
          "access_type"  => "ip",
          "access_to"    => "0.0.0.0/0",
          "access_level" => "rw",
          "access_key"   => '',
          "id"           => "a25b2df3-90bd-4add-afa6-5f0dbbd50452"
        }
      ],
      :quota                    => {
        "gigabytes"          => 1000,
        "shares"             => 50,
        "snapshot_gigabytes" => 1000,
        "snapshots"          => 50,
        "share_networks"     => 10,
        "id"                 => "16e1ab15c35a457e9c2b2aa189f544e1"
      }
    }
  end
end
new(options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 303
def initialize(options = {})
  @openstack_username = options[:openstack_username]
  @openstack_tenant   = options[:openstack_tenant]
  @openstack_auth_uri = URI.parse(options[:openstack_auth_url])

  @auth_token = Fog::Mock.random_base64(64)
  @auth_token_expiration = (Time.now.utc + 86400).iso8601

  management_url = URI.parse(options[:openstack_auth_url])
  management_url.port = 8786
  management_url.path = '/v2'
  @openstack_management_url = management_url.to_s

  @data ||= {:users => {}}
  unless @data[:users].detect { |u| u['name'] == options[:openstack_username] }
    id = Fog::Mock.random_numbers(6).to_s
    @data[:users][id] = {
      'id'       => id,
      'name'     => options[:openstack_username],
      'email'    => "#{options[:openstack_username]}@mock.com",
      'tenantId' => Fog::Mock.random_numbers(6).to_s,
      'enabled'  => true
    }
  end
end
reset() click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 299
def self.reset
  @data = nil
end

Public Instance Methods

add_security_service_to_share_network(_security_service_id, share_network_id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/add_security_service_to_share_network.rb, line 16
def add_security_service_to_share_network(_security_service_id, share_network_id)
  response = Excon::Response.new
  response.status = 200

  share_net = data[:share_network_updated] || data[:share_networks].first
  share_net['id'] = share_network_id
  response.body = {'share_network' => share_net}
  response
end
create_security_service(type, name, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/create_security_service.rb, line 29
def create_security_service(type, name, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  response = Excon::Response.new
  response.status = 200

  security_service = data[:security_services_detail].first.dup

  security_service['type'] = type
  security_service['name'] = name

  response.body = {'security_service' => security_service.merge(options)}
  response
end
create_share(protocol, size, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/create_share.rb, line 30
def create_share(protocol, size, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  response = Excon::Response.new
  response.status = 200

  share = data[:shares_detail].first.dup

  share['share_proto'] = protocol
  share['size']        = size
  share['status']      = 'creating'

  response.body = {'share' => share.merge(options)}
  response
end
create_share_network(options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/create_share_network.rb, line 26
def create_share_network(options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  response = Excon::Response.new
  response.status = 200

  share_net = data[:share_networks_detail].first.dup

  response.body = {'share_networks' => share_net.merge(options)}
  response
end
create_snapshot(share_id, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/create_snapshot.rb, line 28
def create_snapshot(share_id, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  response = Excon::Response.new
  response.status = 202

  snapshot = data[:snapshots_detail].first.dup

  snapshot['share_id'] = share_id
  snapshot['status']   = 'creating'

  response.body = {'snapshot' => snapshot.merge(options)}
  response
end
credentials() click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 337
def credentials
  {:provider                 => 'openstack',
   :openstack_auth_url       => @openstack_auth_uri.to_s,
   :openstack_auth_token     => @auth_token,
   :openstack_region         => @openstack_region,
   :openstack_management_url => @openstack_management_url}
end
data() click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 329
def data
  self.class.data[@openstack_username]
end
delete_security_service(_id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/delete_security_service.rb, line 15
def delete_security_service(_id)
  response = Excon::Response.new
  response.status = 202

  response
end
delete_share(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/delete_share.rb, line 15
def delete_share(id)
  response = Excon::Response.new
  response.status = 202

  share                  = data[:share_updated] || data[:shares_detail].first.dup
  share['id']            = id
  share['links']['self'] = "https://127.0.0.1:8786/v2/shares/#{id}"

  response.body = {'share' => share}
  response
end
delete_share_network(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/delete_share_network.rb, line 15
def delete_share_network(id)
  response = Excon::Response.new
  response.status = 202

  share_net       = data[:share_net_updated] || data[:share_networks_detail].first.dup
  share_net['id'] = id

  response.body = {'share_network' => share_net}
  response
end
delete_snapshot(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/delete_snapshot.rb, line 15
def delete_snapshot(id)
  response = Excon::Response.new
  response.status = 202

  snapshot                  = data[:snapshot_updated] || data[:snapshots_detail].first.dup
  snapshot['id']            = id
  snapshot['status']        = 'deleting'
  snapshot['links']['self'] = "https://127.0.0.1:8786/v2/snapshots/#{id}"

  response.body = {'snapshot' => snapshot}
  response
end
extend_share(_share_id, _new_size) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/extend_share.rb, line 16
def extend_share(_share_id, _new_size)
  response = Excon::Response.new
  response.status = 202
  response
end
get_limits() click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_limits.rb, line 15
def get_limits
  absolute_limits = {
    # Max
    'maxTotalShareGigabytes'     => 1000,
    'maxTotalShareNetworks'      => 10,
    'maxTotalShares'             => 50,
    'maxTotalSnapshotGigabytes'  => 1000,
    'maxTotalShareSnapshots'     => 50,

    # Used
    'totalShareNetworksUsed'     => 0,
    'totalSharesUsed'            => 0,
    'totalShareGigabytesUsed'    => 0,
    'totalShareSnapshotsUsed'    => 0,
    'totalSnapshotGigabytesUsed' => 0
  }

  Excon::Response.new(
    :status => 200,
    :body   => {
      'limits' => {
        'rate'     => [],
        'absolute' => absolute_limits
      }
    }
  )
end
get_quota(project_id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_quota.rb, line 15
def get_quota(project_id)
  response = Excon::Response.new
  response.status = 200
  quota_data = data[:quota_updated] || data[:quota]
  quota_data['id'] = project_id
  response.body = {'quota_set' => quota_data}
  response
end
get_security_service(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_security_service.rb, line 15
def get_security_service(id)
  response = Excon::Response.new
  response.status = 200
  security_service = data[:security_service_updated] || data[:security_services_detail].first
  security_service['id'] = id
  response.body = {'security_service' => security_service}
  response
end
get_share(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_share.rb, line 15
def get_share(id)
  response = Excon::Response.new
  response.status = 200
  share = data[:share_updated] || data[:shares_detail].first
  share['id'] = id
  response.body = share
  response
end
get_share_export_location(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_share_export_location.rb, line 18
def get_share_export_location(id)
  response = Excon::Response.new
  response.status = 200
  share_export_location = data[:export_locations].first
  share_export_location['id'] = id
  response.body = share_export_location
  response
end
get_share_network(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_share_network.rb, line 15
def get_share_network(id)
  response = Excon::Response.new
  response.status = 200
  share_net = data[:share_network_updated] || data[:share_networks].first
  share_net['id'] = id
  response.body = {'share_network' => share_net}
  response
end
get_snapshot(id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/get_snapshot.rb, line 15
def get_snapshot(id)
  response = Excon::Response.new
  response.status = 200
  snapshot = data[:snapshot_updated] || data[:snapshots_detail].first
  snapshot['id'] = id
  response.body = snapshot
  response
end
grant_share_access(share_id, access_to, access_type, access_level) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/grant_share_access.rb, line 18
def grant_share_access(share_id, access_to, access_type, access_level)
  response = Excon::Response.new
  response.status = 200

  access                = data[:access_rules].first
  access[:share_id]     = share_id
  access[:access_level] = access_level
  access[:access_type]  = access_type
  access[:access_to]    = access_to

  response.body = {'access' => access}
  response
end
list_availability_zones() click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_availability_zones.rb, line 15
def list_availability_zones()
  response = Excon::Response.new
  response.status = 200
  response.body = {'availability_zones' => data[:availability_zones]}
  response
end
list_security_services(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_security_services.rb, line 16
def list_security_services(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'security_services' => data[:security_services]}
  response
end
list_security_services_detail(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_security_services_detail.rb, line 16
def list_security_services_detail(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'security_services' => data[:security_services_detail]}
  response
end
list_share_access_rules(share_id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_share_access_rules.rb, line 14
def list_share_access_rules(share_id)
  response = Excon::Response.new
  response.status = 200

  rules = data[:access_rules]
  rules.each do |rule|
    rule[:share_id] = share_id
  end

  response.body = {'access_list' => rules}
  response
end
list_share_export_locations(share_id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_share_export_locations.rb, line 18
def list_share_export_locations(share_id)
  response = Excon::Response.new
  response.status = 200
  response.body = {'export_locations' => data[:export_locations]}
  response
end
list_share_networks(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_share_networks.rb, line 16
def list_share_networks(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'share_networks' => data[:share_networks]}
  response
end
list_share_networks_detail(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_share_networks_detail.rb, line 16
def list_share_networks_detail(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'share_networks' => data[:share_networks_detail]}
  response
end
list_shares(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_shares.rb, line 16
def list_shares(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'shares' => data[:shares]}
  response
end
list_shares_detail(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_shares_detail.rb, line 16
def list_shares_detail(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'shares' => data[:shares_detail]}
  response
end
list_snapshots(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_snapshots.rb, line 16
def list_snapshots(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'snapshots' => data[:snapshots]}
  response
end
list_snapshots_detail(_options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/list_snapshots_detail.rb, line 16
def list_snapshots_detail(_options = {})
  response = Excon::Response.new
  response.status = 200
  response.body = {'snapshots' => data[:snapshots_detail]}
  response
end
remove_security_service_from_share_network(_security_service_id, share_network_id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/remove_security_service_from_share_network.rb, line 16
def remove_security_service_from_share_network(_security_service_id, share_network_id)
  response = Excon::Response.new
  response.status = 200

  share_net = data[:share_network_updated] || data[:share_networks].first
  share_net['id'] = share_network_id
  response.body = {'share_network' => share_net}
  response
end
reset_data() click to toggle source
# File lib/fog/openstack/shared_file_system.rb, line 333
def reset_data
  self.class.data.delete(@openstack_username)
end
revoke_share_access(_share_id, _access_id) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/revoke_share_access.rb, line 16
def revoke_share_access(_share_id, _access_id)
  response = Excon::Response.new
  response.status = 202
  response
end
shrink_share(_share_id, _new_size) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/shrink_share.rb, line 16
def shrink_share(_share_id, _new_size)
  response = Excon::Response.new
  response.status = 202
  response
end
update_quota(project_id, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_quota.rb, line 16
def update_quota(project_id, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]
  data[:quota_updated] = data[:quota].merge(options)
  data[:quota_updated]['id'] = project_id

  response = Excon::Response.new
  response.status = 200
  response.body = {'quota_set' => data[:quota_updated]}
  response
end
update_security_service(id, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_security_service.rb, line 16
def update_security_service(id, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  data[:security_service_updated]       = data[:security_services_detail].first.merge(options)
  data[:security_service_updated]['id'] = id

  response = Excon::Response.new
  response.status = 200
  response.body = {'security_service' => data[:security_service_updated]}
  response
end
update_share(id, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_share.rb, line 16
def update_share(id, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  update_data(id, options)

  response = Excon::Response.new
  response.status = 200
  response.body = {'share' => data[:share_updated]}
  response
end
update_share_network(id, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_share_network.rb, line 16
def update_share_network(id, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  data[:share_net_updated]       = data[:share_networks_detail].first.merge(options)
  data[:share_net_updated]['id'] = id

  response = Excon::Response.new
  response.status = 200
  response.body = {'share_network' => data[:share_net_updated]}
  response
end
update_snapshot(id, options = {}) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_snapshot.rb, line 16
def update_snapshot(id, options = {})
  # stringify keys
  options = Hash[options.map { |k, v| [k.to_s, v] }]

  data[:snapshot_updated]       = data[:snapshots_detail].first.merge(options)
  data[:snapshot_updated]['id'] = id

  response = Excon::Response.new
  response.status = 200
  response.body = {'snapshot' => data[:snapshot_updated]}
  response
end

Private Instance Methods

update_data(id, options) click to toggle source
# File lib/fog/openstack/shared_file_system/requests/update_share.rb, line 30
def update_data(id, options)
  data[:share_updated]                  = data[:shares_detailed].first.merge(options)
  data[:share_updated]['id']            = id
  data[:share_updated]['status']        = "PENDING"
  data[:share_updated]['links']['self'] = "https://127.0.0.1:8786/v2/shares/#{id}"
end