In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
It is believed that many inexperienced people have no idea about how to implement an external interface in OpenStack4j. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Add maven dependency package org.pacesys openstack4j 3.0.3 withdeps to the project through permission authentication import org.openstack4j.api.OSClient.OSClientV3;import org.openstack4j.openstack.OSFactory;import org.openstack4j.model.common.Identifier;# use Identifier.byId ("domainId") or Identifier.byName ("example-domain") Identifier domainIdentifier = Identifier.byId ("domainId") # unscoped authentication# as the username is not unique across domains you need to provide the domainIdentifierOSClientV3 os = OSFactory.builderV3 () .authenticate ("http://127.0.0.1:5000/v3") .authentication (" admin "," sample ", domainIdentifier) .authenticate () # project scoped authenticationOSClientV3 os = OSFactory.builderV3 () .authenticate ("http://127.0.0.1:5000/v3") .authentication (" admin "," secret ", Identifier.byName (" example-domain ")) .scopeToProject (Identifier.byId (projectIdentifier)) .authenticate () # domain scoped authentication# using the unique userId does not require a domainIdentifierOSClientV3 os = OSFactory.builderV3 () .authentication ("http://127.0.0.1:5000/v3"). Domains (" userId "," secret ") .scopeToDomain (Identifier.byId (domainIdentifier)) .authenticate (); # Scoping to a project just by name isn't possible as the project name is only unique within a domain. # You can either use this as the id of the project is unique across domains OSClientV3 os = OSFactory.builderV3 () .authenticate ("http://127.0.0.1:5000/v3") .authentication (" userId "," secret ") .scopeToProject (Identifier.byName (projectName), Identifier.byName (domainName)) .authenticate () # Or alternatively OSClientV3 os = OSFactory.builderV3 () .authentication ("http://127.0.0.1:5000/v3") .domains (" userId "," secret ") .scopeToDomain (Identifier.byName (domainName)) .authenticate (); common module calls / / Find all UsersList
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.