How to get corresponding google photo ids and google files? - google-api

Users may optionally have their Google Photos show up as a folder in Google Drive. Deleting in Drive deletes in Photos, and vice versa (with exceptions for albums and other gotchas). See https://support.google.com/photos/answer/6156103 for details.
Is it possible to get the correspondence between a Photos mediaItem resource and Drive files resource via the API?
I've already done the naive thing: look for matching and embedded ids in both. No luck. Sample returns from the API are included below. (Ids and URLs were slightly mangled to make them non-functional.)
example mediaItem:
{'id': 'APyCggKCjFW9fw_WJwaa5OUXE4Yp9nO2xk1Srkm9Eb-mA9l2pXRAy4oihnPfcAbez7',
'productUrl': 'https://photos.google.com/lr/album/APyCggJA4K-E0UOQMMAtnShqRVdP057VPEROpkqN2FYZcoVd4v8iz_3bu/photo/APyCggKCjFa8g5W9fw_WJwaaQObO2xk1Srk6Eb-mA9l2pXRAy4oihnPfcAbez7',
'baseUrl': 'https://lh3.googleusercontent.com/lr/AJ-EwvnNBVMKbifgSTnqRPr0qpKpiTE46ONto1IIq3ALLBMQFE14-PEzwTRRwuX0ym35ZIQFavk2HmbyMYtnzElMxoXxQpHOQqot1e-Uh1Y6WzcyPoRnenA1xDwwsnPugsnK0vRdoEPiBMNF25NTnNZ8m7F4Za0Xd-b1FbIYow4BrIFAlKwPfv5g8-tk8CaNoOOTmL5TVoDfJwcOyD7McFdOm4dN-731itNxaYonVF5WVw66-aqQxKRvd-P6HFZ7b_bQQxB9foQLFdOLqVWmF2Jpp5ep801--ekkZF7wSQw-7obcqXLfqi9ieW_OWSjMOh77nkqMwdQ9dhXJ-XgfdDsuzZRrft8338nKsiGyt9EgNT4a26k7A1y9G2phCKFYO7O8Rwhs_uRuX4Lc6c3Tbng_VEt5cTiWO_OiMddGyyWRR4d9gWLTAYeNTDqFHO_0ZhEYjcwbYmBvzgY7Pg1wOxtPj3WtZXXRf5AvpKEOmhHiaIeEh0rwFAbde0E1NBbB7tNm4YOq_YIIxjKnaN4v0OsghB6ah3nVNwVxIszrTCR6DgGCFOCEgJyETLLAmi8aUDDhoyzGqCtpiPZ3FeFozIeimeGbvLTiefjo-39Fiiuc7_vSKFkgOAnDq-gDhRDvwO4SoPm4JrD_4YbTkb_1rmf8Iv26lCplEJJxM4g0_b6MrvE4JEI5uyOf01Rk_Am5v7s7piOdsmAHr7pKVorY3EhU5ezNAgzye9V2Is9cuK2ALQOG17UyH9sxWlHPxtDLKV2Ur8gfem0bqzO2WNjMn_rX_Q27W',
'mimeType': 'image/jpeg',
'mediaMetadata': {'creationTime': '2018-12-25T15:28:26Z',
'width': '2448',
'height': '3264',
'photo': {'cameraMake': 'Apple',
'cameraModel': 'iPhone 6 Plus',
'focalLength': 4.15,
'apertureFNumber': 2.2,
'isoEquivalent': 32}},
'filename': 'IMG_0924.JPG'}
example file:
{'kind': 'drive#file',
'id': '1XXkAo-AL7PXBXNpS27cGBCsHvHOaCtXBgQ',
'name': 'IMG_0924.JPG',
'mimeType': 'image/jpeg',
'description': '',
'starred': False,
'trashed': False,
'explicitlyTrashed': False,
'parents': ['jpWRoFkPQ0mg'],
'spaces': ['photos', 'drive'],
'version': '2',
'webContentLink': 'https://drive.google.com/a/bogus.com/uc?id=1XXkAo-AL77cGBCsHvHOaCtXBgQ&export=download',
'webViewLink': 'https://drive.google.com/a/bogus.com/file/d/1XXkAo-AL77cGBCsHvHOaCtXBgQ/view?usp=drivesdk',
'iconLink': 'https://drive-thirdparty.googleusercontent.com/16/type/image/jpeg',
'hasThumbnail': True,
'thumbnailLink': 'https://lh3.googleusercontent.com/zxSXO-GJkKmVVejNzEYreyx7_wEddrq2VPWsVSCFRdRfiVdI5--oWm00=s220',
'thumbnailVersion': '1',
'viewedByMe': False,
'createdTime': '2018-12-25T15:28:26.000Z',
'modifiedTime': '2019-01-06T16:56:08.000Z',
'modifiedByMeTime': '2019-01-06T16:56:08.000Z',
'modifiedByMe': True,
'owners': [{'kind': 'drive#user',
'displayName': 'Reece Hart',
'photoLink': 'https://lh5.googleusercontent.com/-QYk9j/AAAAAAI/AAAAOFo/PC9sT/s64/photo.jpg',
'me': True,
'permissionId': '03329584261458389005',
'emailAddress': 'reece#bogus.com'}],
'lastModifyingUser': {'kind': 'drive#user',
'displayName': 'Reece Hart',
'photoLink': 'https://lh5.googleusercontent.com/-QYk9i9j/AAAAAAI/AAAAOFo/PC9j/s64/photo.jpg',
'me': True,
'permissionId': '03329584261458389005',
'emailAddress': 'reece#bogus.com'},
'shared': False,
'ownedByMe': True,
'capabilities': {'canAddChildren': False,
'canChangeCopyRequiresWriterPermission': True,
'canChangeViewersCanCopyContent': True,
'canComment': True,
'canCopy': True,
'canDelete': True,
'canDownload': True,
'canEdit': True,
'canListChildren': False,
'canMoveItemIntoTeamDrive': False,
'canReadRevisions': True,
'canRemoveChildren': False,
'canRename': True,
'canShare': True,
'canTrash': True,
'canUntrash': True},
'viewersCanCopyContent': True,
'copyRequiresWriterPermission': False,
'writersCanShare': True,
'permissions': [{'kind': 'drive#permission',
'id': '03329584261458389005',
'type': 'user',
'emailAddress': 'reece#bogus.com',
'role': 'owner',
'displayName': 'Reece Hart',
'photoLink': 'https://lh5.googleusercontent.com/-QYk9i9/AAAAA/AAAA/PC9jsT/s64/photo.jpg',
'deleted': False}],
'permissionIds': ['03329584261'],
'originalFilename': 'IMG_0924.JPG',
'fullFileExtension': 'JPG',
'fileExtension': 'JPG',
'md5Checksum': '7ffdb3f36ba89bcad4b7e3b40a6ef356',
'size': '116216',
'quotaBytesUsed': '0',
'headRevisionId': '1gSdsharFji-NH3dDz9AitkOycA',
'imageMediaMetadata': {'width': 1200,
'height': 1600,
'rotation': 0,
'location': {'latitude': 37.72585277777778,
'longitude': -122.41243611111112,
'altitude': 1075.620606060606},
'colorSpace': 'sRGB'},
'isAppAuthorized': False}

Starting July 10 2019, Google Photos and Google Drive no longer sync, so there no longer is any correspondence between photos in Drive and Photos - they are entirely separate entities.
You can however import photos from Google Drive to Google Photos.

Related

botium-cli emulator does not work with the rasa connector

When I try to start the emulator for my rasa bot, I get this error. The rasa endpoint url works perfectly fine when I send it a request with curl.
$ botium-cli emulator
Error: Start failed: undefined
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:170:25
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2955:19
at wrapper (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:268:20)
at iterateeCallback (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:413:21)
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:321:20
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2953:17
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:130:17
Here's the botium.json
{
"botium": {
"Capabilities": {
"PROJECTNAME": "My Botium Project",
"CONTAINERMODE": "rasa",
"RASA_MODE": "DIALOG_AND_NLU",
"SIMPLEREST_STRICT_SSL" : "false",
"RASA_ENDPOINT_URL": "https://example.com/webhooks/rest/webhook"
},
"Sources": {},
"Envs": {}
}
}
Here's the output from the emulator with the verbose tag.
Still does not work, maybe it has to do something with the way botium connects to the bot?
$ botium-cli emulator --verbose
2021-03-05T08:17:32.230Z botium-cli Using Botium configuration file ./botium.json
2021-03-05T08:17:32.240Z botium-cli-emulator command options: {
_: [ 'emulator' ],
verbose: true,
v: true,
convos: [ '.' ],
C: [ '.' ],
config: './botium.json',
c: './botium.json',
ui: 'console',
'$0': '..\\..\\AppData\\Roaming\\npm\\node_modules\\botium-cli\\bin\\botium-cli.js'
}
2021-03-05T08:17:32.573Z botium-core-BotDriver Loaded Botium configuration files C:\Users\shivam.sinha\Desktop\rasa check\botium.json
2021-03-05T08:17:33.085Z botium-core-BotDriver Build - Botium Core Version: 1.11.1
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Capabilites: {
PROJECTNAME: 'My Botium Project',
TESTSESSIONNAME: 'Botium Test Session',
TESTCASENAME: 'Botium Test Case',
TEMPDIR: 'botiumwork',
CLEANUPTEMPDIR: true,
WAITFORBOTTIMEOUT: 10000,
SIMULATE_WRITING_SPEED: false,
SIMPLEREST_PING_RETRIES: 6,
SIMPLEREST_PING_TIMEOUT: 10000,
SIMPLEREST_PING_VERB: 'GET',
SIMPLEREST_PING_UPDATE_CONTEXT: true,
SIMPLEREST_STOP_RETRIES: 6,
SIMPLEREST_STOP_TIMEOUT: 10000,
SIMPLEREST_STOP_VERB: 'GET',
SIMPLEREST_START_RETRIES: 6,
SIMPLEREST_START_TIMEOUT: 10000,
SIMPLEREST_START_VERB: 'GET',
SIMPLEREST_POLL_VERB: 'GET',
SIMPLEREST_POLL_INTERVAL: 1000,
SIMPLEREST_POLL_UPDATE_CONTEXT: true,
SIMPLEREST_METHOD: 'GET',
SIMPLEREST_IGNORE_EMPTY: true,
SIMPLEREST_TIMEOUT: 10000,
SIMPLEREST_EXTRA_OPTIONS: {},
SIMPLEREST_STRICT_SSL: false,
SIMPLEREST_INBOUND_UPDATE_CONTEXT: true,
SIMPLEREST_CONTEXT_MERGE_OR_REPLACE: 'MERGE',
SCRIPTING_TXT_EOL: '\n',
SCRIPTING_XLSX_EOL_WRITE: '\r\n',
SCRIPTING_XLSX_HASHEADERS: true,
SCRIPTING_CSV_SKIP_HEADER: true,
SCRIPTING_CSV_QUOTE: '"',
SCRIPTING_CSV_ESCAPE: '"',
SCRIPTING_NORMALIZE_TEXT: true,
SCRIPTING_ENABLE_MEMORY: false,
SCRIPTING_ENABLE_MULTIPLE_ASSERT_ERRORS: false,
SCRIPTING_MATCHING_MODE: 'wildcardIgnoreCase',
SCRIPTING_UTTEXPANSION_MODE: 'all',
SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
SCRIPTING_UTTEXPANSION_NAMING_MODE: 'justLineTag',
SCRIPTING_UTTEXPANSION_NAMING_UTTERANCE_MAX: '16',
SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
ASSERTERS: [],
LOGIC_HOOKS: [],
USER_INPUTS: [],
SECURITY_ALLOW_UNSAFE: true,
CONTAINERMODE: 'rasa',
RASA_MODE: 'DIALOG_AND_NLU',
RASA_ENDPOINT_URL: 'https://10.60.31.102:8080/webhooks/rest/webhook',
CONFIG: './botium.json'
}
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Sources : { LOCALPATH: '.', GITPATH: 'git', GITBRANCH: 'master', GITDIR: '.' }
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Envs : { IS_BOTIUM_CONTAINER: true }
2021-03-05T08:17:33.274Z botium-connector-PluginConnectorContainer-helper Botium plugin botium-connector-rasa loaded. Plugin version is 0.0.7
Error: Start failed: undefined
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:170:25
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2955:19
at wrapper (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:268:20)
at iterateeCallback (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:413:21)
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:321:20
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2953:17
at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:130:17
The RASA_ENDPOINT_URL capability has to point to the base URL of your Rasa server - without the /webhooks/rest/webhook path. Botium will build up it's own full url endpoint path based on the RASA_MODE capability:
NLU_INPUT => /model/parse is appended
REST_INPUT => /webhooks/rest/webhook/ is appended
{
"botium": {
"Capabilities": {
"PROJECTNAME": "Botium Project Rasa NLU",
"CONTAINERMODE": "rasa",
"RASA_MODE": "NLU_INPUT",
"RASA_ENDPOINT_URL": "https://demo.botiumbox.com/rasa-demo/"
}
}
}

Fastlane disable availability on Mac

I am trying to disable the availability of my apps on Mac when I deploy them with Fastlane.
I found this article enter link description here but I do not understand how to implement this.
I've got a lane that is responsible for creating a new app. So I don't use Spaceship at all here. How can implement this on my end?
Thank you
Here is a part of the Fastfile code:
conf = get_app_config(app)
update_user_credentials(conf)
name = conf.company_name
ios_meta = IosMetadata.new(conf)
ios_meta.deploy
puts "Screenshots: ##{ios_meta.screenshots_path}"
deliver(
force: true,
username: ENV["USERNAME"],
skip_binary_upload: false,
ipa: File.join(path_to_ipa),
app_icon: ios_meta.icon_path,
app_version: options[:app_version],
app_identifier: conf.app_identifier,
screenshots_path: ios_meta.screenshots_path,
overwrite_screenshots: true,
metadata_path: ios_meta.metadata_path,
ignore_language_directory_validation: true,
submit_for_review: true,
automatic_release: true,
submission_information: {
add_id_info_uses_idfa: true,
add_id_info_limits_tracking: true,
add_id_info_tracks_install: true,
add_id_info_serves_ads: false,
export_compliance_uses_encryption: false,
export_compliance_encryption_updated: false,
export_compliance_compliance_required: true,
content_rights_contains_third_party_content: false,
content_rights_has_rights: false
},
team_name: conf.team_name,
team_id: conf.itc_team_id
)
Any implementation of is_opted_in_to_distribute_ios_app_on_mac_app_store I tried inside this code brought errors of type "Unknown property"

After Image Uploading, image uri is null for iOS alone in React Native

In my React Native app, I have added an functionality to upload multiple images, which will be stored as image[] including uri.
This works perfectly for Android.
But for iOS, the image[] is created also contains some data but it is entirely different from android. And for uri null value only present.
Please help me to solve this issue.! (Note: Android should not get affected by change.)
Thanks in advance.!
Images Array: (For Android)
[
{ 'file': 'content://media/external/images/media/30993',
'size': 125434,
'uri': 'content://media/external/images/media/30993',
'isDirectory': false,
'md5': '041550fe959f36d1b247bb6b2eaa3272',
'exists': true },
{ 'file': 'content://media/external/images/media/30988',
'size': 541148,
'uri': 'content://media/external/images/media/30988',
'isDirectory': false,
'md5': '39bf35dfcf0852c5412205195a395b29',
'exists': true
}
]
Images Array: (For iOS)
[
{
'file': 'assets-library://asset/asset.JPG?id=C2FBB68D-2012-4696-8648-D8990F72BF77&ext=JPG',
'size': 125434,
'modificationTime': 1552019118.1320686,
'uri': null,
'isDirectory': 0,
'md5': '041550fe959f36d1b247bb6b2eaa3272',
'exists': 1
},
{
'file': 'assets-library://asset/asset.JPG?id=98EBA95A-254E-40F4-8E1D-C355D8795777&ext=JPG',
'size': 541148,
'modificationTime': 1552019117.7241733,
'uri': null,
'isDirectory': 0,
'md5': '39bf35dfcf0852c5412205195a395b29',
'exists': 1
}
]
[Updated]
I need to get the absolute file path from this url 'assets-library://asset/asset.JPG?id=98EBA95A-254E-40F4-8E1D-C355D8795777&ext=JPG' , which is similar to 'content://media/external/images/media/30988'.
Please help me to resolve this issue.!
Thanks in advance.!
I had this exact same issue.
The solution is to set the uri to the 'file' attribute.
This is how you can append the image into formData correctly for both iOS and Android:
let uri = image.file;
// extract the filetype
let fileType = uri.substring(uri.lastIndexOf(".") + 1);
formData.append('uploads[]', {
uri,
name: `photo.${fileType}`,
type: `image/${fileType}`,
});
You can't remove the additional data on the iOS filename "?id=98EBA95A-254E-40F4-8E1D-C355D8795777&ext=JPG'" at this point, otherwise it won't upload. You can remove it at the server side though.

Exclude directory relative to project root

I work in a project that has two copies of the framework it uses, one of them not being used (please don't ask):
C:\Projects\Foo\app\Vendor\cakephp\cakephp
C:\Projects\Foo\lib\Cake
What's the syntax to completely obliterate \lib\Cake in files.exclude or search pane?
None of these seem to work:
/lib/Cake
/lib/Cake/
/lib/Cake/**
lib/Cake
lib/Cake/
lib/Cake/**
**/lib/Cake
**/lib/Cake/
**/lib/Cake/**
… plus the same patters with Windows style path separators.
They either ignore both copies or ignore none.
sample file
"files.exclude": {
"*/**/node_modules/": true,
"wp-includes/": true,
"wp-admin/": true,
//"wp-*.*": true,
"wp-config.*": false,
"xmlrpc.php": true,
".vscode/": true,
"*/**/cache/": true,
"*/**/uploads/": true,
"*/**/infinitewp/": true,
"*/**/.github/": true,
//"*/**/build/": true
},
"search.exclude": {
"build/": true,
},
taken from : https://daveredfern.com/hide-or-exclude-folders-and-files-from-search-in-visual-studio-code/

Openstack project create exits with a error

I am using Ubuntu 16.04 and Openstack Newton. I followed the guide from Openstack Documentation. But when I reach the step where I am supposed to create a Openstack project .
openstack project create --domain default --description "Service Project" service -v
It is exiting with error.
START with options: [u'project', u'create', u'--domain', u'default' u'--description', u'Service Project', u'service', u'-v']
command: project create -> openstackclient.identity.v3.project.CreateProject
Using auth plugin: password
An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-856f08ea-f6d2-44c5-9042-eb6b64539847)
END return value: 1
EDIT:
I executed the same command with a Debug flag and this is the output.
START with options: [u'project', u'create', u'--domain', u'default',u'--description', u'Service Project', u'service', u'--debug']
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', auth_type='', auth_url='http://controller:35357/v3', authorization_code='', cacert=None, cert='', client_id='', client_secret='***', cloud='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', key='', log_file=None, old_profile=None, openid_scope='', os_beta_command=False, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', passcode='', password='***', profile=None, project_domain_id='', project_domain_name='default', project_id='', project_name='admin', protocol='', redirect_uri='', region_name='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='default', user_id='', username='admin', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', u'interface': None, 'auth_url': 'http://controller:35357/v3', u'network_api_version': u'2', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username': 'admin', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'user_domain_name': 'default', 'project_name': 'admin', 'project_domain_name': 'default'}, 'default_domain': 'default', 'debug': True, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'timing': False, 'password': 'wasd', 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'disable_vendor_agent': {}}
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': u'1', u'database_api_version': u'1.0', 'timing': False, 'auth_url': 'http://controller:35357/v3', u'network_api_version': u'2', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username': 'admin', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'default', 'auth_url': 'http://controller:35357/v3', 'password': '***', 'project_domain_name': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, u'interface': None, 'password': '***', 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', u'interface': None, 'auth_url': 'http://controller:35357/v3', u'network_api_version': u'2', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username': 'admin', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'user_domain_name': 'default', 'project_name': 'admin', 'project_domain_name': 'default'}, 'default_domain': 'default', 'debug': True, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'timing': False, 'password': 'wasd', 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'disable_vendor_agent': {}}
command: project create -> openstackclient.identity.v3.project.CreateProject
Using auth plugin: password
Using parameters {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'default', 'auth_url': 'http://controller:35357/v3', 'password': '***', 'project_domain_name': 'default'}
Get auth_ref
REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.12.1 python-requests/2.10.0 CPython/2.7.12"
Starting new HTTP connection (1): controller
"GET /v3 HTTP/1.1" 200 250
RESP: [200] Date: Fri, 06 Jan 2017 09:19:47 GMT Server: Apache/2.4.18 (Ubuntu) Vary: X-Auth-Token X-Distribution: Ubuntu x-openstack-request-id: req-b9223d75-3b3e-4fed-a265-8c6d5278e23b Content-Length: 250 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}
Making authentication request to http://controller:35357/v3/auth/tokens
"POST /v3/auth/tokens HTTP/1.1" 401 114
Request returned failure status: 401
The request you have made requires authentication. (HTTP 401) (Request-ID: req-e130cf4c-4f89-43fa-a470-639478ef19ef)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 380, in run_subcommand
self.prepare_to_run_command(cmd)
File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 434, in prepare_to_run_command
self.client_manager.auth_ref
File "/usr/lib/python2.7/dist-packages/osc_lib/clientmanager.py", line 198, in auth_ref
self._auth_ref = self.auth.get_auth_ref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 181, in get_auth_ref
return self._plugin.get_auth_ref(session, **kwargs)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v3/base.py", line 167, in get_auth_ref
authenticated=False, log=False, **rkwargs)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 675, in post
return self.request(url, 'POST', **kwargs)
File "/usr/lib/python2.7/dist-packages/osc_lib/session.py", line 40, in request
resp = super(TimingSession, self).request(url, method, **kwargs)
File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
return wrapped(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 570, in request
raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-e130cf4c-4f89-43fa-a470-639478ef19ef)
clean_up CreateProject: The request you have made requires authentication. (HTTP 401) (Request-ID: req-e130cf4c-4f89-43fa-a470-639478ef19ef)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 135, in run
ret_val = super(OpenStackShell, self).run(argv)
File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 267, in run
result = self.run_subcommand(remainder)
File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 180, in run_subcommand
ret_value = super(OpenStackShell, self).run_subcommand(argv)
File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 380, in run_subcommand
self.prepare_to_run_command(cmd)
File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 434, in prepare_to_run_command
self.client_manager.auth_ref
File "/usr/lib/python2.7/dist-packages/osc_lib/clientmanager.py", line 198, in auth_ref
self._auth_ref = self.auth.get_auth_ref(self.session)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 181, in get_auth_ref
return self._plugin.get_auth_ref(session, **kwargs)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/v3/base.py", line 167, in get_auth_ref
authenticated=False, log=False, **rkwargs)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 675, in post
return self.request(url, 'POST', **kwargs)
File "/usr/lib/python2.7/dist-packages/osc_lib/session.py", line 40, in request
resp = super(TimingSession, self).request(url, method, **kwargs)
File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
return wrapped(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 570, in request
raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-e130cf4c-4f89-43fa-a470-639478ef19ef)
END return value: 1
Create a script (credentials.sh) with following variables:
export OS_USERNAME=admin
export OS_PASSWORD=<ADMIN-PASS-HERE>
export OS_TENANT_NAME=admin
export OS_AUTH_URL=https://identityHost:5000/v3
Source the script
source credentials.sh
now execute your openstack project create command
After installation, need to bootstrap firstly.
Have you run similar instructions?
For example, issue following commands,
keystone-manage bootstrap --bootstrap-password ADMIN_PASS \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:35357/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id RegionOne
Then try again.
I also had this issue - turns out that I had a typo in my keystone.conf file.
I found this by going through all the configuration steps and confirming that I had setup everything correctly.

Resources